Sunday, November 02, 2008

Move Time Machine Backups to a New Volume

I used up all the room on my 160 GB Time Machine volume, so I picked up a Western Digital My Book Essential Edition 1 TB Hard Drive to increase my backup capacity.

How do I transfer my existing Time Machine backup from the old, maxed-out disk to the new one? I'm running Mac OS X 10.5 Leopard; the steps might be different for other versions of OS X.

As it turns out, you can't just drag your old Time Machine backups to the new disk using a Finder copy. Time Machine creates all kinds of "hard links" to the files that aren't changed. If you just copy these files in the Finder, you'll create full copies of all the links, ballooning the size of your backup exponentially. Instead, you need to use a Block Copy operation. This requires that you completely erase the new drive as part of the copy procedure.

Here's an overview of the steps I followed to transfer my Time Machine backups. Note that I use both "drives" and "volumes" to refer to logical disk drive volumes.
  1. Ensure that the system isn't trying to work with your Time Machine drives.
    • Turn off Time Machine & stop using the original drive for backups.
    • Tell Spotlight not to index your Time Machine drives.
  2. Perform a Block Copy of your original Time Machine database to the new drive.
  3. Tell Time Machine to use the new drive as the Time Machine backup drive.
It took me a while to get this to work, as I ran into some permissions issues. To start, I found this tip for Mac OS X 10.5: Move Time Machine backup to another drive, which recommended using a Disk Utility Restore to copy the data. Unfortunately, I get the message:
Could not restore - Operation not permitted
even with Time Machine turned off. It looked like the Mac was trying to access the new drive while I was doing the backup. So, I turned Time Machine off completely, using these steps:

Deactivate Time Machine
  1. Open Time Machine Preferences.
  2. Turn Time Machine OFF using the slider switch.
  3. Click [Change Disk...].
  4. Select None.
  5. Click [Use for Backup]
These steps will prevent Time Machine from trying to access the drive at any time during the (potentially) lengthy period it requires to move your data.

I also recommend turning of Spotlight indexing for the Time Machine drives (not a bad idea in general, because you really don't need to index the backups with both Time Machine & Spotlight).

Turn off Spotlight Indexing for your Time Machine drives
  1. Open Spotlight preferences (System Preferences > Spotlight).
  2. Select the Privacy tab.
  3. Add your Time Machine disks to the Prevent Spotlight from searching these locations list box using the Add (+) button in the lower left, or dragging the disk icon from the Finder to the list box.
[Antonio notes in the comments: Boot from the Leopard DVD so you can perform all of the following steps without having to make of the any adjustments to Spotlight described above.]

Block Copy the Time Machine Backups using Disk Utility Restore

I used the Disk Utility Restore feature to move my data. It failed the first few times because I neglected to erase the destination disk, to allow Disk Utility to use Block Copy mode. Here's how to do it:
  1. Open Disk Utility.
  2. Select the original Time Machine volume.
  3. Click the Restore tab.
  4. Drag the icon for the original Time Machine volume to the Source: field.
  5. Drag the icon to for the new Time Machine volume to the Destination: field.
  6. Click Erase destination -- this is important because it addresses the permissions issues that plagued me, and also allows Disk Utility to use a block copy mode.
  7. Click [Restore].
Note that you'll need to authenticate to perform these steps. The end result: it took about 7 and a half hours to restore 150 GB of data on my 2.4 G Hz MacBook Pro. More than half of this time was the verification pass. Also, the name of the source volume was applied to the destination, which was a little confusing.

Now, it's time to point Time Machine at the new drive.
  1. Open Time Machine Preferences and authenticate, if required.
  2. Click [Choose Backup Disk...].
  3. Select the disk you prepared (I renamed it with a more descriptive name).
  4. Click Click [Use for Backup].
  5. Confirm the Time Machine slider is set ON.
I selected a folder that has had lots of changes, and opened the Time Machine "lost in space" interface: it's got backups for the last six months -- it looks like it worked.

Carbon Copy Cloner

I took a close look at the comments on the tip Move Time Machine backup to another drive and it looks like Carbon Copy Cloner (CCC) is another option. Since the Disk Utility approach didn't work the first few times, I also tried using CCC to copy the data via block mode.

Here's what I did in Carbon Copy Cloner 3.1.2
  1. Selected the old Time Machine volume as the Source Disk.
  2. Selected the new Time Machine volume as the Target Disk.
  3. For Cloning options:, select Backup everything,
  4. Check Delete itmes that don't exist on the source (this is required to use block-copy mode, which is recommended). Note that this also erased today's Time Machine backup from the new volume, but that's not a problem.
  5. Click [Clone].
Now it's time to do something else, as this process is going to take quite a while. In fact, it didn't work at all: I checked the CCC Log and everything was failing, and CCC was using rsync to move the data, not block mode. So, I canceled, and instead used Disk Utility with the Erase destination option, as described above.

I never got a chance to try Super Duper, which is highly recommended for block copy operations such as the one I just completed. If you've used Super Duper to transfer your Time Machine database to a new volume, successfully or not, please post a comment with the results of your transfer.

Other Resources
Update

Geordie comments below that he couldn't get these steps to work on OS X 10.5.6 when trying to move from a 250GB LaCie disk to a 1 TB Iomega disk, using Apple's Disk Tools, but succeeded with Super Duper .