Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Use rysnc to perform automatic backups' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Use rysnc to perform automatic backups
Authored by: ukkarhu on May 17, '05 04:37:56PM
That's a very valid point - and one I fell for. To include this into my original hints, the code is:

# Local Daily script
# Andrew Padley
#
echo "Starting Daily rsync backup on `date`"
VOLUME="/Volumes/Backup"
if [ -d $VOLUME ]; then
for FSYS in /Users
do
        /usr/bin/rsync -aE --delete $FSYS $VOLUME
        if [ $? != 0 ]; then
                echo " ==> Error during rsync of $FSYS"
        else
                echo "rsync of $FSYS OK on `date`"
        fi
done
else
        echo "==> Backup Volume was not present"
fi
echo "Finished Daily rsync backup at `date`"
Funny thing with rsync is that you seem to need to run it twice to get it to sync properly - something fishy going on here somewhere...!!!

[ Reply to This | # ]