#! /bin/sh #------------------------------------------------------------------------- # 2005 Stuart Lawson # Works in OS X 10.4.1 # This script uses psync # psync - Copyright 2002 Dan Kogai # psync - 0.69.3 - get version from versiontracker.com #------------------------------------------------------------------------- #------- Edit variables here #------------------------------------------------------------------------- # User path to be archived MYFILES="/Users"; # Path to volume where files wil be backed up MYBACKUP="/Volumes/yourExternalHD/YourBackupFolder"; # Email address to send status report to after PSYNC is done MYEMAIL="your.name@yourdomain.com"; # Message in email sent when PSYNC fails to run FAILED="The PSYNC backup did not run because of an error. Either the backup external drive is not mounted or the file path names have been altered."; #------------------------------------------------------------------------- #------- Don't edit below here #------------------------------------------------------------------------- /usr/local/bin/psync -d $MYFILES $MYBACKUP >/psyncOut.txt; if grep -c "copying items" /psyncOut.txt then tr 'r' 'n' `date`" $MYEMAIL; rm /psyncOut.txt; else echo "$FAILED" | mail -s "Warning: Backup script FAILED on ----> `date`" $MYEMAIL; rm /psyncOut.txt; fi #-------------------------------------------------------------------------