[CentOS] Rsync/SSH automation problem?

Gordon Messmer yinyang at eburg.com
Thu Apr 30 21:19:04 UTC 2009


James Bensley wrote:
> 
> I have a win2k3 server that its backing up to a CentOS 5.3 server. On
> the Win2k3 machine I plan to have rsync back up nightly to the CentOS
> server through ssh. The command I am using is as follows:
> 
> rsync -vrPtz -e ssh myuser at myserver:/remote/backup/folder/ /local/backup/folder/

The first thing I'm sure you noticed was that this syntax copies data 
from a remote system to the local one, which is the opposite of what you 
described doing, above.

The second thing you will notice, eventually, is that rsync over ssh 
under Cygwin is unreliable.  This has been the case for years and has 
something to do with Cygwin's emulation of blocking sockets which causes 
rsync to hang.  Even if your backups are working now, I strongly 
recommend against continuing in this manner.

If you want to use rsync on Windows, the best thing to do is run rsync 
and ssh daemons on the Windows host.  Rsync should only listen for 
localhost connections.  Run your backup jobs from Linux; ssh to the 
Windows machine and forward a port for rsync.  A local rsync can then 
connect to the Windows machine over the port forward.




More information about the CentOS mailing list