This took a short while to figure out, since most guides out there are written for pre OSX 10.7. I guess this should work for 10.7 and 10.8 and is a lot less effort than some of the solutions I’ve seen out there (thanks to the use of tmutil).
- create an encrypted local sparsebundle [code]
hdiutil create -size 1g -type SPARSEBUNDLE -encryption AES-128 -nospotlight -volname “backup” -fs “Case-sensitive Journaled HFS+” -verbose backup
[/code] which will create an AES encrypted backup.sparsebundle - move the sparsebundle to your mounted network drive and resize it to the desired magnitude [code]
hdiutil resize -size 300g backup.sparsebundle
[/code] - mount the sparsebundle (which is now on your network drive) locally on your mac
- The magic: tell timemachine to use the mounted sparsebundle as the backup drive [code]
sudo tmutil setdestination /Volumes/backup
[/code] - Open time machine (behold: your backup sparsebundle is indeed selected as current drive) and start backing up. This should create a Backups.backupdb folder in the image and from here it’s just waiting.
Update:
http://trollop.org/2012/07/12/os-x-10-8-mountain-lion-time-machine-netatalk/#comment-957 reveals that there is a way to automount your sparsebundle. It amounts to using the following command in step 4:
[code]sudo tmutil setdestination afp://user:pass@host/share[/code], where of course user/pass and host/share should be adapted to fit your needs.