restart rsync process via shell script
Smoot Carl-Mitchell
smoot at tic.com
Tue Dec 30 03:07:17 UTC 2008
On Mon, 2008-12-29 at 14:35 -0800, Noah wrote:
> Hi there,
>
> I am trying to figure out the most accurate way to assess if an rsync
> process is running and is established to the remote rsync server and is
> transferring data. I am writing a bourne shell script to restart rsync
> if the connection to the remote rsync server is lost.
Are you running rsync over SSH? If so, take a look at the
ServerAliveCountMax and the ServerAliveInterval SSH options. You should
be able to use those to terminate a connection when the server is no
longer responsive. The rsync client should detect when underlying SSH
process terminates and then you should be able to restart the rsync
process. Also check out the --timeout option to rsync. It may also
give you a way for the client process to die gracefully when the TCP
connection is slow or unresponsive.
--
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005
More information about the ubuntu-users
mailing list