[svlug] A rsync script for SVLUG consumption.
theotiwii at earthlink.net
Sat Mar 24 00:11:01 PST 2001
A while back we had a few threads on backups, someone mentioned 'rsync.'
I loaded a copy and exercised it, I thought the resulting script novel
enough to share with anyone looking for a few ideas to get their own
The 'novelty' is such:
* Self propagating, both searches for a newer 'version' of itself
and if directed, will push newer versions to other systems, this allows
timely addition and retractions of rsync directives, avoiding manual
coping to each system and cron directories participating in the rsync
* Runs in all cron processes from a single script (symbolically
linked); can be run from the command line by supplying the desired
* If a rsync cannot be performed (daily, weekly, monthly) due to a
communication error (system down?) the script will write a temporary
HOURLY rsync script (resulting in hourly retries - duh) of the downed
system and will subsequently erase itself upon successful execution.
* Creates the necessary directory structure required for the rsync
destination and checks for disk space prior to execution of each rsync
* Uses ssh or rsh for the transport protocol and will rsync the host
system to itself (without those programs installed) making it a
convenient method to preserve local copies of a file or directory
without user intervention (good for hourly transfers of material from
one device to another).
* Contains a flexible message generation facility for tracking
* Has a generic structure that can be used by other shell
programmers to spring board their own cron ideas.
* Demonstrates a half-hearted attempt to document the code after it
was written... er.. I guess that's hardly novel :-)
I don't have a site to post to so drop me a line and I'll forward it (or
post it somewhere public and thread the location to this message).
(Note: it's about 14K gzip'ed)
More information about the svlug