Topic "Partial Synchronization"

Author Message
Stephane Tinseau
[View user's profile]

Joined: 2014-06-18
Posts: 7
Location: Paris
Hi,

I have develop 2 scripts with WinSCP and powershell to synchronize 2 file servers,
The first to synchronize and the second to check.
Unfortunately, i need to run the first script several time to ensure all files are correctly replicated.

For Synchronization, i have mapped the share drive and Synchronize directories using the following options
Code:
session.timeout="1:0:0"
sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
sessionOptions.AddRawSettings("Utf","1")
transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off

session.SynchronizeDirectories(
    [WinSCP.SynchronizationMode]::Remote,
    source,
    destination,
    True
    False
    [WinSCP.SynchronizationCriteria]::Eitherm
    transferOptions)


For checking, i have used ListDirectory on both file server with the following options and compare the results.
Code:
sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
sessionOptions.AddRawSettings("Utf","1")
session.timeout="0:5:0"
session.ListDirectory(path)


The first script take around 30 mns but the second around 3 hours.

For both scripts, i used WinSCPnet 5.7.6.0 (1.2.10.5874) and WinSCP 5.7.6.0 (5.7.6.5874)

Could you please help me to solve this issue.

Thanks
Regards
Stephane
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Sorry, it's not clear what the issue is. Can you try again? Is the problem, that you need to run the script multiple times to get the files in sync? Why? What's wrong after the first run?

Also make sure you attach a full log file showing the problem. And explain us, what we should look for in the log.
Stephane Tinseau
[View user's profile]

Joined: 2014-06-18
Posts: 7
Location: Paris
Hi,

It's my fault due to lot of updated files during synchronization.
There is no problem.

Thanks
Regards
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