I use rsync and cron to mirror the /dev/sda array.
Mounted into that array is removable media that should
not be mirrored. I'm sure someone will see why $LABEL
is not being excluded much quicker than I can.
#mirror ~/clients, delete from destination anything
that doesn't exist at source
#do not mirror removable media; anything other than
#kill with ctrl-c, --partial allows resuming of
#find scsi device labels
for arg in `ls /dev/sd[b-d][1-16]`
echo `/sbin/dumpe2fs -h $arg |grep Filesystem\
volume\ name` > /home/studio/.bin/syncExclude
#use sed for character substitution
LABELS=`cat /home/studio/.bin/syncExclude |sed
's/Filesystem volume name:\ //'`
rsync --exclude=$LABELS --rsh=ssh --times --perms
--owner --verbose --progress --compress --delete
--recursive --stats --partial
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around