alistairphillips.com

I’m : a web and mobile developer based in the Manning Valley, Australia.


Backup schedule

As well as TimeMachine backups I archive some specific data into a .dmg for storage in the Amazon S3 cloud. The bash script that I use is listed below and generates a disk image in the formation of YYYY-MM-DD.dmg which I manually upload.

    IMAGENAME=`date +%Y-%m-%d`
    cd ~
    hdiutil create -encryption -stdinpass -srcfolder Documents/ -srcfolder /Library/WebServer/ -srcfolder Sites/ $IMAGENAME.dmg

(Getting the date into the filename shamelessly stolen from http://onjava.com/pub/a/mac/2004/02/10/backup.html)