How to detect hanging rsync from bash-script ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to detect hanging rsync from bash-script ?

Samba - rsync mailing list
I am using rsync on an unreliable mobile WAN connection, which causes rsync
receiver to hang for long time, when connection is broken during transfere.
As the option "--timeout=" here does not hit for me, is there a recommended
"best" method to detect such scenario ?

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to detect hanging rsync from bash-script ?

Samba - rsync mailing list
On Mon, 10 Apr 2017 06:50:24 +0000 (UTC)
reiner otto via rsync <[hidden email]> wrote:

> I am using rsync on an unreliable mobile WAN connection, which causes
> rsync receiver to hang for long time, when connection is broken
> during transfere. As the option "--timeout=" here does not hit for
> me, is there a recommended "best" method to detect such scenario ?

One good way would be to use rsync's --rsh option to
invoke ssh yourself with something like -o ServerAliveInterval.

It's not clear to me how you'd get the ssh error code back
out of rsync, in other words what error rsync returns in the
case of transport failure.  Maybe 10?  Perhaps someone else
can chime in here?


Karl <[hidden email]>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Loading...