Here are the scripts I mentioned in [Backup Strategy](http://prwdot.org/2006/07/12/backup-strategy/).
The config file format for this script looks like the following:
description|A description of the backup you're performing rsync_source|The source server or directory (What you're backing up from) rsync_target|The target server or directory (What you're backing up to) rsync_options|Any options you wish to pass to rsync (Type 'man rsync' at your command line for more info) logfile|Name of the file to which you wish to log the script's activities
To run the script, simply execute it at the command line and pass the path to the config file as an argument. For example:
Here are the config files I use:
prwdot.cfg — backs up my web host to my home directory
description|prwdot.org rsync_source|--myusername--@--myhostname--:/home/prwdotor rsync_target|/Users/prw/prwdotbackup rsync_options|-a -u -C --stats logfile|/Users/prw/backup/logs/prwdot.log
prw.cfg — backs up my home directory to the media drive (aka miniStack)
description|prw Home Directory rsync_source|/Users/prw rsync_target|/Volumes/miniStack/prw_backup rsync_options|-E -a -u -C --stats logfile|/Users/prw/backup/logs/prw.log
miniStack.cfg — backs up the miniStack to the backup drive
description|miniStack rsync_source|/Volumes/miniStack rsync_target|/Volumes/miniStackBackup rsync_options|-E -a -u -C --stats logfile|/Users/prw/backup/logs/miniStack.log
To revise what I had stated in my previous post, this script doesn’t actually use config files at the moment. As you will see, it simply uses variables embedded within the script. I can convert it to use a config file easily enough… if I do so, I’ll update this post with that information.
To run it, simply execute the script and pass the name of the database you wish to dump to a config file. For example:
I hope that you find these scripts to be useful… let me know if you have any questions about them!