Topic "Synchronize over IP vs over local network"

Author Message
shcsbaker
[View user's profile]

Joined: 2014-12-11
Posts: 10
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 10.0.0.1 and the Synology has 10.0.0.2. 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 10.0.0.2 ip address because those transfers don't count against my bandwidth.

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

Option 2
& D:\winscp.com /ini=nul /command 'open ftp://[user]:[pass]@10.0.0.2' '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 = "10.0.0.2"
$sessionOptions.UserName = "user"
$sessionOptions.Password = "password"


$session = New-Object WinSCP.Session
$session.Open($sessionOptions)

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


$session.Dispose()
Advertisements

You can post new topics in this forum

Search

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