Partial Synchronization

Advertisement

Stephane Tinseau
Joined:
Posts:
7
Location:
Paris

Partial Synchronization

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
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.
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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Partial Synchronization

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.

Reply with quote

Advertisement

You can post new topics in this forum