Time Machine has been one of my favorite features about the Mac. It was the most anticipated feature for me when waiting for the release of Mac OS X 10.5. It has saved my behind a few times from disk failure with nary a single lost file. Apple describes Time Machine as follows:
Time Machine works with your Mac and an external hard drive. Just connect the drive and assign it to Time Machine and you’re a step closer to enjoying peace of mind. Time Machine will automatically back up your entire Mac, including system files, applications, accounts, preferences, music, photos, movies, and documents. But what makes Time Machine different from other backup applications is that it not only keeps a spare copy of every file, it remembers how your system looked on a given day — so you can revisit your Mac as it appeared in the past.
Recently I have been switching to backing all my computers up to my server and had questions about using sparse bundles and backing up over the network. Unable to find a complete set of instructions, I have decided to share what I have learned.
Backing up with sparse bundles
What is a sparse bundle? Its a type of disk image that can have a maximum size set, but only takes up as much space as it needs to on the physical disk. Time Machine is a notorious hog of disk space. It will utilize as much as it can for backing up your files, which can be nice. Sometimes though, it can be undesirable. The beauty about backing up to sparse bundles is that if you have a large disk you are backing up to, say 2 TB, and your drive on your computer is only 200 GB, you can make a sparse bundle that is 500 GB to back up to and basically reserve the remaining 1.5 TB of the backup disk for other uses.
So how do you set up sparse bundles? Well, the first step is to create one with Disk Utility.
- Open Disk Utility
- Select File > New Blank Disk Image
- Set the file name to your computer name followed by an underscore and it’s primary mac address (eg: “macbook_00113bcd9e”)
- Set the size to custom, then choose an appropriate size. It should be at least the size of your disk, and probably half again or twice as big.
- You can set encryption on the file. This is so no others can access your data if your backup disk gets stolen, etc. 128 is probably good enough. It will be slower with 256 bit encryption.
- Keep it partitioned as an “Apple Partition Map”
- Select “Sparse Bundle Disk Image” as the Image Format
Now save it on whatever disk you want to use as your backup. Make sure you save it in the top-level directory of the drive. Time Machine can’t locate the sparse bundle unless its in the top-level directory.
Keeping sparse bundles out of the root directory
So, what if you don’t want it in your top-level directory? If this is an external disk, you may have no choice. If it’s another Mac, then there is a way around it. In my case, I have my OS X server performing task of backup disk since it provides redundant backup in the way of RAID 5. I wanted to place all my sparse disk images in one folder. Well, if you are backing up over the network, you can perform some trickery to make Time Machine do what you want. This is accomplished by sharing the folder that contains the sparse bundles so that the computer backing up to the server sees that folder as a disk with the sparse images in the top-level directory even though it is not so. To do this, follow these steps on the computer hosting the sparse bundles:
- Open System Preferences
- Select Sharing
- Select File Sharing
- Under Shared Folder click the plus button
- Navigate to and select the folder containing your sparse bundle(s)
- Under Users, select the appropriate users to have access to the folder.
That’s it. Now, from other computers, you can connect to the host computer and mount up your shared folder containing sparse bundles and select that disk in Time Machine preferences to be your backup disk. The name of the sparse bundle will indicate to Time Machine to use that sparse bundle rather than put the information directly on the mounted disk.
Time Machine Error
I saw this error on my server. When I searched on Google, I couldn’t find any information about the cause or solution to the problem.
“Time Machine could not be configured. The built-in network interface could not be found.”
This error stems from the fact that Time Machine identifies the computer based on it’s built in network adapter’s mac address. Computers that have this error are either “hackintoshes” that have no built in ethernet adapter, or have damaged hardware and are using an external adapter or PCI card. In either case, I have no solution for the problem yet, but will update this post if I find it.
Scheduling
Time Machine is wonderful because of its incremental nature. It saves backups hourly. This can be a nuisance however when backing up over the network because there can be a noticeable slow down of the computer during backup. To remedy this problem, I found a program called TimeMachineScheduler that allows the interval between backups to be specified as well a times that Time Machine shouldn’t run.