Topic "Sync local trying to go the wrong direction"

Author Message
bmenk
[View user's profile]

Joined: 2011-05-18
Posts: 5
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:

Quote:

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:

Quote:

> 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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
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).
bmenk
[View user's profile]

Joined: 2011-05-18
Posts: 5
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
bmenk
[View user's profile]

Joined: 2011-05-18
Posts: 5
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
If you run GUI, do you see the option unchecked initially now?
_________________
Martin Prikryl
bmenk
[View user's profile]

Joined: 2011-05-18
Posts: 5
When I open the saved gui session, the direction defaults correctly to "local" but the "Existing Files Only" box remains checked.

prikryl wrote:
If you run GUI, do you see the option unchecked initially now?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Have you checked the Use same options next time on Synchronize dialog?
_________________
Martin Prikryl
bmenk
[View user's profile]

Joined: 2011-05-18
Posts: 5
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



prikryl wrote:
Have you checked the Use same options next time on Synchronize dialog?
Guest




Support.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License