Sync local trying to go the wrong direction

Advertisement

bmenk
Joined:
Posts:
5

Sync local trying to go the wrong direction

I have a scripted sync that is giving me trouble.

The script connects fine and will do other operations fine (ls, lls, get).

However when I use the synchronize local command I get odd behavior.

Here's what I have scripted:

option batch on
option confirm off
option transfer
lcd c:\Windows\Batch\LibDrupal-From-libwebmirror\
cd /var/www/libdrupal
synchronize local

Here's what I get back in the log file:

> 2011-05-18 15:17:32.568 Script: option batch on
< 2011-05-18 15:17:32.568 Script: batch on
> 2011-05-18 15:17:32.583 Script: option confirm off
< 2011-05-18 15:17:32.583 Script: confirm off
> 2011-05-18 15:17:32.583 Script: option transfer
< 2011-05-18 15:17:32.583 Script: transfer automatic
> 2011-05-18 15:17:32.583 Script: lcd c:\Windows\Batch\LibDrupal-From-libwebmirror\
< 2011-05-18 15:17:32.583 Script: c:\Windows\Batch\LibDrupal-From-libwebmirror
> 2011-05-18 15:17:32.583 Script: cd /var/www/libdrupal
. 2011-05-18 15:17:32.583 Cached directory change via "/var/www/libdrupal" to "/var/www/libdrupal".
. 2011-05-18 15:17:32.583 Getting current directory name.
< 2011-05-18 15:17:32.583 Script: /var/www/libdrupal
> 2011-05-18 15:17:32.583 Script: synchronize local
< 2011-05-18 15:17:32.583 Script: Comparing...
. 2011-05-18 15:17:32.583 Collecting synchronization list for local directory 'c:\Windows\Batch\LibDrupal-From-libwebmirror' and remote directory '/var/www/libdrupal', mode = 1, params = 6
. 2011-05-18 15:17:32.583 Listing directory "/var/www/libdrupal".
> 2011-05-18 15:17:32.583 Type: SSH_FXP_OPENDIR, Size: 27, Number: 523
< 2011-05-18 15:17:32.583 Type: SSH_FXP_HANDLE, Size: 13, Number: 523
> 2011-05-18 15:17:32.583 Type: SSH_FXP_READDIR, Size: 13, Number: 780
< 2011-05-18 15:17:32.583 Type: SSH_FXP_NAME, Size: 3125, Number: 780
> 2011-05-18 15:17:32.583 Type: SSH_FXP_READDIR, Size: 13, Number: 1036
< 2011-05-18 15:17:32.583 Type: SSH_FXP_STATUS, Size: 28, Number: 1036
< 2011-05-18 15:17:32.583 Status code: 1
> 2011-05-18 15:17:32.583 Type: SSH_FXP_CLOSE, Size: 13, Number: 1284
< 2011-05-18 15:17:32.599 Script: Synchronizing...
. 2011-05-18 15:17:32.599 Synchronizing local directory 'c:\Windows\Batch\LibDrupal-From-libwebmirror\' with remote directory '/var/www/libdrupal/', params = 6
> 2011-05-18 15:17:32.599 Script: close

Everything looks ok up to the last 2 lines or so. It reads the remote directory, tries to synchronize, but then all of a sudden it tries to synchronize from the local directory out to the remote instead. The local directory is empty, so it does nothing and then quits.

This works fine in the gui by the way. ANd it works fine if I do a "get" instead of a "synchronize local"

Thanks in advance for any help you can offer.

Bobb Menk

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Sync local trying to go the wrong direction

The message "Synchronizing local directory 'A' with remote directory 'B'" has nothing to do with a direction. The direction is specified by the mode = 1. Problem is that you have "existing only" option enabled (in the GUI).

Reply with quote

bmenk
Joined:
Posts:
5

Re: Sync local trying to go the wrong direction

So I'm a bit confused. Do I need to set this up as a profile in the GUI and then save it before I run this?

Or is there a command line switch I should be using to change "mode 1" to some other mode? And what would that mode be?

Thanks.

Bobb Menk

Reply with quote

bmenk
Joined:
Posts:
5

Re: Sync local trying to go the wrong direction

OK. I did a manual sync using the gui, unchecking "existing only" and then saving the session. No issues, everything as expected.

Then I deleted a couple of files on the local side and ran the command line script. It goes through the comparisons for each file and directory and then comes back with "nothing to sync".

Is this a caching issue of some sort perhaps?

Thanks.

Bobb Menk

Reply with quote

martin
Site Admin
martin avatar

Re: Sync local trying to go the wrong direction

If you run GUI, do you see the option unchecked initially now?

Reply with quote

Advertisement

bmenk
Joined:
Posts:
5

Re: Sync local trying to go the wrong direction

When I open the saved gui session, the direction defaults correctly to "local" but the "Existing Files Only" box remains checked.

martin wrote:

If you run GUI, do you see the option unchecked initially now?

Reply with quote

martin
Site Admin
martin avatar

Re: Sync local trying to go the wrong direction

Have you checked the Use same options next time on Synchronize dialog?

Reply with quote

bmenk
Joined:
Posts:
5

Re: Sync local trying to go the wrong direction

I did not have that checked, so I did a manual sync in the GUI, checked "Use same options next time" and then saved that session. That seems to be working. Thanks for your help!

Bobb Menk



martin wrote:

Have you checked the Use same options next time on Synchronize dialog?

Reply with quote

Advertisement

You can post new topics in this forum