LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-31-2012, 10:43 AM   #1
scottgus1
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Rep: Reputation: Disabled
can cygwin rsync handle temporary network outages?


We're using Deltacopy's distribution of Cygwin Rsync (v3.0.4, I believe) to backup two large Virtualbox virtual hard drives from our work Windows 7 VM host, over the internet through Logmein Hamachi VPN, to an XP PC in my boss's basement. I have rsync running in a batch file which monitors the return error code rsync gives, and restarts the rsync command if the error code isn't 0. It works just fine. Mostly...

Occasionally the connection goes down for a few seconds up to a few minutes (I've troubleshooted the loss of the connection to my boss's home ISP disconnecting; the work internet connection is fine). Rsync will throw an error 12, then continue throwing error 10's every time the batch file tries to restart the backup, until the connection re-establishes itself, usually within three minutes, sometimes right away.

I have been looking for a way to get the rsync process to not fail but wait patiently for the connection to come back.

Here's my command:

rsync.exe -v -rlt -z -h --chmod=a=rw,Da+x --delete --progress "/cygdrive/E/VMbackups/Server2003.vdi" "ham.achi.ip.address::BU1/VMbackups/Server2003.vdi"

I found the "--timeout" switch which sets a timeout limit on I/O, but defaults to no timeout if not used. (I think...)

There's also "--contimeout", which sets a limit on how long rsync will wait to establish a connection. (Does this apply for waiting for a connection to re-establish?)

Is there anything to make rsync wait a while for a previously active but presently dropped connection to reconnect before throwing an error?
 
Old 08-31-2012, 10:47 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Hmm. I read this http://www.unix.com/unix-dummies-que...k-outages.html on the unix.com forum today.

I think --timeout might be what you are looking for.
 
Old 08-31-2012, 11:00 AM   #3
scottgus1
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yep, same question different forum

The man page for rsync says this about --timeout:

--timeout=TIMEOUT
This option allows you to set a maximum I/O timeout in seconds.
If no data is transferred for the specified time then rsync will
exit. The default is 0, which means no timeout.

I had interpreted this to mean that "no timeout" = no limit imposed, ie, wait forever. I just tried looking at this from the "other side" of my head and realize this may mean, no tolerance for timeouts? Am I now seeing this right?

I'll try putting the switch in. Thanks for the quick response, SZ!
 
Old 08-31-2012, 01:18 PM   #4
scottgus1
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Well, I'm afraid it didn't fly. I added "--timeout=600", which should, if I had read right, have allowed for a 10-minute window before showing an error. Here's the updated command:

rsync.exe -v -rlt -z -h --chmod=a=rw,Da+x --timeout=600 --delete --progress "/cygdrive/E/VMbackups/Server2003data.vdi" "ham.achi.ip.address::BU1/VMbackups/Server2003data.vdi"

I let it go for a while to be sure data was being transferred, then I remoted into the basement PC and disconnected the VPN client. Regrettably, the rsync process on the local PC errored out and quit within 5 seconds.

I also tried "--contimeout=600" too, same result.

Any thoughts?
 
Old 09-04-2012, 11:32 AM   #5
scottgus1
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Is there a better forum for this question?
 
Old 09-10-2012, 08:09 AM   #6
scottgus1
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Any other thoughts?

Anyone have other ideas on how to get an rsync to wait for a network connection that dropped out to return?
We've tried --timeout and --contimeout without success...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync 3.0.8 with cygwin rvw Linux - General 0 08-03-2011 08:47 AM
[SOLVED] rsync v.3.0.7 over cygwin 1.7.6 fails... blainemiller Linux - Server 3 06-10-2011 12:37 PM
Cygwin & in-memory storage of (temporary) files? rapidgeo Linux - Newbie 2 10-20-2010 11:43 PM
rsync option in cygwin ufmale Linux - Newbie 2 01-25-2009 12:06 PM
Using rsync with CygWin and W2K spano Linux - Networking 1 03-15-2005 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration