Synchronize over IP vs over local network



Synchronize over IP vs over local network

I have a Win 2008 R2 server and a Synology Rackstation sitting in a datacenter. Each have their own IP address. Since both have multiple NIC ports, I've connected the server directly to the synology using local ip addresses. On server it's and the Synology has Each night I sync files from Server to the Synology using a command line from inside Powershell. Option 1 below works great and is VERY Fast, Option 2 gets Lost Connection Timeout detected. (data connection) could not retrieve directory listing. Option 3 works but is VERY SLOW (10+ mins). I need to use the ip address because those transfers don't count against my bandwidth.

Option 1:
& D:\ /ini=nul /command 'open ftp://[user]:[pass]@[ip]' 'synchronize remote C:\HB\LocalUser /home/Data' 'exit'

Option 2
& D:\ /ini=nul /command 'open ftp://[user]:[pass]@' 'synchronize remote C:\HB\LocalUser /home/Data' 'exit'

Option 3
Add-Type -Path "D:\PSDaily\WinSCPnet.dll"

$sessionOptions = New-Object WinSCP.SessionOptions
$sessionOptions.Protocol = [WinSCP.Protocol]::ftp
$sessionOptions.HostName = ""
$sessionOptions.UserName = "user"
$sessionOptions.Password = "password"

$session = New-Object WinSCP.Session

$session.SynchronizeDirectories([WinSCP.SynchronizationMode]::Remote, "C:\HB\LocalUser", "/home/Data", $False)


Reply with quote


You can post new topics in this forum