Date created: Tuesday, November 2, 2010 10:44:40 PM. Last modified: Monday, January 25, 2021 2:10:22 PM

TimeMachine Sparsebundle

TimeMachine is Apple's wonderful backup utility which creates incremental differential backups (after a full initial backup of course), and runs on its own schedule in the back ground (which can be changed by editing some preferences, see below) and has a great UI with pretty pictures, and can backup across a network, and... blah blah blah! But despite all its greatness; it is a proprietary utility that runs only on OS X and isn't open source, natively it doesn't like to run over anything except AFP AND it is poorly document (as are many apply utilities) when it comes to the under-the-hood stuff. 

TM likes to back up to a sparse bundle although it can also do it to a sparse image, or even just a flat partition, each type providing less functionality than the last. After successfully deploying a Linux server as a TM destination, when the time came to do it again I had forgotten some of TM's pitfalls.

When creating a sparse bundle for use as a TM backup destination (over a network location, specifically over SMB, NFS or if you're running AFP on a non-Mac os such as Avahi and Netatalk on Linux) it seems you must make the sparse bundle on the OS X box locally  then move it across?!?! I never managed to make a sparse image over SMB or AFP to a Linux server (never tried NFS)

Some working commands I have come up with are:

hdiutil create -size 2500g -layout SPUD -fs HFS+J -type SPARSEBUNDLE -volname "Backup of Server" Server_001122334455.sparsebundle

or

dd if=/dev/zero of=/samba/share/server_001122334455.img bs=1024M count=2500

followed by mounting the blank dd file and formatting it.

See here for scripting TM (as the Linux server was only on at night during the daily backup period) and here for scheduling AppleScripts

Note: Currently in a multi-os environment I have been experimenting with CrashPlan which is working out OK!


Previous page: Static Routes
Next page: Update from SUS Now