My Time Machine backup (6 TB USB-HDD) contains the data from my Mac's internal hard drive (2 TB) and from an external hard drive (USB 4 TB, Mac OS Extended, FileVault Encrypted) that I always keep attached.
Somehow my external 4 TB HD got corrupted and I need to reformat it. I want it Mac OS Extended, Encrypted, just as it was.
What is the right way to restore all the files from my Time Machine Backup so that Time Machine sees the hard drive as it was?
I had a similar problem before. Restoring the root folder of the HD with Time Machine was no problem, but Time Machine recognized the new formatted hard drive as a new one, resulting in a unnecessary new full backup of the HD, filling up my backup volume.
Best Answer
I found an answer over at superuser.com: https://superuser.com/a/1148703 But it seems there were some changes in MacOS so it did not work. But with this as a starting point I found a solution:
sudo tmutil associatedisk -a
. Then first drag your new Volume to the Terminal and after that drag the folder link Latest to the Terminal. You will find this folder link on your Time Machine Volume -> Backups.backupsdb -> Your Computer Name.The result should look like this:
sudo tmutil associatedisk -a /Volumes/Daten /Volumes/YourBackupVolume/Backups.backupdb/Your\ Computer\ Name/Latest
At the end of the line you need to add/Daten
or whatever your failed HD was named.sudo tmutil associatedisk -a /Volumes/Daten /Volumes/YourBackupVolume/Backups.backupdb/Your\ Computer\ Name/Latest/Daten
press Enter, enter your password and press Enter again.After that, Time Machine will see your new volume as the old one and will only backup the new files.
The reason why this is necessary is that Time Machine recognises the volumes not by their name but by their UUID, which is a long unique number that changes with every formatting. The
associatedisk
command tells Time Machine the new UUID of the volume.