10

My external hard drive has failed. It will no longer spin up and therefore is unmountable. Thankfully I had added it to my OSX Time Machine backups. So, since disks are cheap, I can just go buy a new, probably larger external drive and restore, right? But how do I tell Time Machine that this is a replacement and to restore to the new drive?


PS - Yes I did remove the external drive from TM's exclude list and have verified that the backup is there on TM's own external drive.


PPS - Posted this same question on the Apple support forum and got a response that I just need to name the new disk the same as the old disk. This was not from an Apple employee. Any thoughts?

8

Naming the brand new drive the same as the old drive is the first step, but it doesn't get your files restored. After that you need to open the (empty) drive in Finder and then "Enter Time Machine" from the Time Machine icon in the Menu Bar. You can then go back to your last backup, select all the files and folders at the top level of your (old) drive, control-click on them and restore them. Prior to doing this I turned off Time Machine backups while this long restore was taking place.

I tried Migration Assistant but it didn't appear to have the ability to select a specific hard drive to restore.

I am in the middle of a restore using this method, and have yet to see whether Time Machine in Snow Leopard successfully identifies the new drive as the same as the old drive. When I tried this method last year in Leopard, Time Machine decided that the identically-named drive was a new drive with the same name -- I ended up with two backups named "Ext HD" and Ext HD 1", one of which was the old, discarded drive, and the two together doubling the amount of space they used on my backup drive. You can control-click on an item in Time Machine and have it delete all backups of an item if you end up in this situation, but then you'll lose all your old archival backup data for the drive.

Also, I suspect this method misses hidden files at the root of the drive -- if you've changed the drive icon it isn't restored, for example. If that's a problem I believe you can navigate up one level to the machine in the Time Machine window, select just the external hard drive backup, and restore everything, but it will then be in a folder named after your external hard drive. You'll have to manually move both the visible and hidden items once the restore is done.

  • 3
    My restore finished, and Time Machine does not recognize the restored drive as identical to the original -- it attempts to backup the entire contents again from scratch. – Ert Feb 13 '11 at 1:26
  • 1
    It is possible to associate a new disk with an old backup using the tmutil associatedisk command apple.stackexchange.com/a/262005/83347 – Michael_Scharf Nov 22 '16 at 19:02
  • Thanks. I finally found this answer and started restoring. Thanks a lot! – shigeya Jul 24 '18 at 17:29
3

Lets assume

  • your old disk was mounted under /Volumes/USB-old
  • the new disk is mounted as /Volumes/USB-new (may be the same name as the old one. I use a different name to make clear what is what)
  • the time machine backup is under /Volumes/backups

To restore the backup stop time machine (in the preferences: uncheck the "Back Up Automatically" checkbox) and restore it on the command line:

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

You can associate the new disk with the backup using:

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

Note: even if your new disk is mounted under the same name as the old one, you have to run the command above, because time machine uses the disk UUID and not the disk name to associate the backup (see man tmutil)!

If you now switch on time machine, it will not create a new backup and add changes on top of the old backup.

  • Strongly recommend this solution; worked perfectly for me restoring a data drive with over 2.5 TB of data (took about 16 hours on a 2010 Mac mini running High Sierra, and two USB drives). – outis nihil Feb 26 '18 at 13:39
  • "stop time machine (in the preferences)" -- is it "Back Up Automatically" checkbox in System Preferences > Time Machine? – yurkennis Nov 6 '18 at 15:45
  • yes, it is the "Back Up Automatically" checkbox in System Preferences – Michael_Scharf Nov 6 '18 at 21:01
1

Naming the new volume the same as the old one makes it very easy to go back one step in time and restore the contents of that volume's root directory.

What the restore doesn't seem to do is copy over the extended attributes

com.apple.metadata:_kTimeMachineNewestSnapshot 

and

com.apple.metadata:_kTimeMachineOldestSnapshot

that Time Machine uses to decide whether it needs to re-backup a file. So, when you turn Time Machine back on with the new volume in place, it backs up another copy of every single file instead of creating just another set of hard links to the copy it already has. If you have a backup drive that is big enough then this is OK (not ideal, but OK). If your backup drive doesn't have the additional room, then you've potentially got a problem.

I haven't tried restoring the files using Unix commands instead of Time Machine's "Restore" button to see if one can keep the extended attributes in place. I believe that they are kept in the Time Machine backup so in theory one should be able to retain them and make Time Machine understand that it still has an unchanged copy of the files.

  • 2
    For a command line restore with Lion or greater, try the restore verb of tmutil. – Graham Perrin Jul 24 '12 at 8:54
-1

In my understanding, trying to avoid "duplicating" the files in USB-new backup is futile. Here's why:

I just experienced the same situation as OP, and through Official Apple Support chat went through the process of recovering the files manually using Finder to access the TM backup database. What I discovered -and OAP validated- is that TM creates a complete copy of the EXTERNAL HDD each time it backs it up. (Not so for the internal HD)

That is, I go to EACH "date-folder" and a complete set of my files is there (at date of backup, obviously) having effectively dozens of copies of the older files. OAS confirmed this occurs "by design" indeed, is quite inefficient in terms of speed and space, and it is one reason why TM puts external drives into the exclusion list by default and automatically.

Accordingly, after recovering, I'll have to go to EACH folder in the database and delete the files of the "old" backups, if I want to save space in the Time Capsule disk. As you can see, "mapping" the old an new backup disks has no effect in reducing the amount of times de files are copied in the backup database.

Again, this was a real case and with Apple Official Support chat.

I hope this adds on previous recommendations and comments or other experiences on the contrary are welcome.

Any recommendations on a better, INCREMENTAL backup MacOS software to backup USB drives? And to backup a NAS? - Forget the Cloud, that will take months to recover in the event of a large failure (And outside the USA you do not get mail delivery services of recover disks) so I have it, but as a Plan-C case.

  • You seem to be answering a different question. Can you explain how this is an answer to this question? – G-Man Jan 13 '18 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.