[sclug] Spotting errors in a scheduled rsync job
David Given
dg at cowlark.com
Fri Jun 8 23:13:06 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tom Chance wrote:
[...]
> I'm using rsync (via Cygwin on a Win2k3 server) to backup data from a server at work to a network attached storage device. It's a nice, simple solution and I've got it running every night without any problems.
rsync ought to fail with an error code if things go wrong. If you're using
cygwin, you should be able to use Unixisms to test for this. The simplest
thing is to put something like this in your script:
(
rsync ...
) || (
echo "Rsync failed --- do something useful here!"
)
Alternatively, the very simplest thing to do is to run rsync in an at or cron
job, but I don't know if cygwin supports this. If the job fails, it'll mail
you with the output --- very useful.
- --
??? ?????????????? ??? http://www.cowlark.com ???????????????????
? "Parents let children ride bicycles on the street. But parents do not
? allow children to hear vulgar words. Therefore we can deduce that cursing
? is more dangerous than being hit by a car." --- Scott Adams
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGaeKCf9E0noFvlzgRAo3KAJ4/oiY1I1pXR0MvxOzq+DmuP64xeACfcq+n
O0gAUSwaEFjzxnigAt8HCtg=
=xo+2
-----END PGP SIGNATURE-----
More information about the Sclug
mailing list