3

One of my external USB disks died. I want to restore the time machine backup to a new (bigger) external USB disk.

I could just copy the latest backup to the new disk, but I want to keep the backup history, so that time machine uses the new disk as a replacement for the old disk (with all the backup history).

3

I found a solution that does use the existing backup. The trick is to use sudo tmutil associatedisk (see man tmutil).

My old disk was mounted under /Volumes/USB-old and the new disk is mounted as /Volumes/USB-new. My backup is under /Volumes/backups. (If your old and new disk have both the same name, you have to follow all of the steps, because the name of the disk is not sufficient to associate an old backup with a new disk)

  1. Stop time machine to do backups (in the preferences)
  2. Restore the old data to the new disk:

    sudo tmutil restore /Volumes/backups/Backups.backupdb/MacBookPro/Latest/USB-old/* /Volumes/USB-new
    

    (note this does not restore files starting with . at the top level)

  3. Tell time machine to associate the new disk to the old backups:

    sudo tmutil associatedisk /Volumes/USB-new /Volumes/backups/Backups.backupdb/MacBookPro/Latest/USB-old
    
  4. Start time machine to do backups

Now time machine does not try to backup the entire new disk. Instead, it creates incremental backups based on the old snapshot.

However, it seems not possible to go back in history using Time Machine. I have tried to associate all old backups with the new disk without much success:

for dir in `find /Volumes/backups/Backups.backupdb/MacBookPro -maxdepth 2 -name USB-old`; do 
    echo sudo tmutil associatedisk /Volumes/USB-new $dir
done
  • see also superuser.com/questions/65146/… – Michael_Scharf Nov 22 '16 at 19:20
  • From the man page: The -a option tells associatedisk to find all snapshot volumes in the same machine directory that match the identity of USB-old, and then perform the association on all of them. sudo tmutil associatedisk -a /Volumes/USB-new /Volumes/backups/Backups.backupdb/MacBookPro/Latest/USB-old – Martin Ackerl Aug 11 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .