I ran into the same issues when following advice similar to the OP, specifically, to use Time Machine to start the backup to create a new sparse bundle on the network share, stop the back and copy Backups.backupdb
to the newly created sparse bundle.
My solution is to mimic what Time Machine does to create the new sparse bundle with only one difference: format with "Mac OS Extended (Journaled)", which is not case sensitive. The major benefit to this solution, in addition to preserving old backups, is that this maintains all of Time Machine's expectations of a network share backup disk, and thus, hourly auto backups, etc. will work seamlessly without other scripts or workarounds.
I've kept details and notes for myself in the "Migration from External HDD to Samba" section at: https://gist.github.com/martian111/e0d9885004eb56fd6abf3d1ba7671737, but the TL;DR steps relevant to solving this question are (starting at where the OP left off when he/she encountered the error):
- If necessary, stop Time Machine backup and disable until migration is complete.
- Create a new sparse bundle using "Mac OS Extended (Journaled)" as the format and the same naming conventions as the unusable, case-sensitive sparse bundle created by Time Machine.
- Use
distutil
to enableOwnership
on the "Time Machine Backups" volume (after mounting the created sparse bundle). (Ref: https://apple.stackexchange.com/a/53243/174505)
- In the Finder, move/copy the
Backups.backupdb
directory to the new volume after confirming ownership is enabled. The Finder should prompt for admin privileges.
- Unmount "Time Machine Backups" volume
- Copy
com.apple.TimeMachine.*
metadata files from the sparsebundle directory created by Time Machine into the sparsebundle created above.
- Delete the unusable, Time Machine created sparsebundle, and replace it with the one created here (changing the sparsebundle directory name).
- Re-enable Time Machine's "Back Up Automatically".
Once the above is done, the next Time Machine backup should recognize the sparse bundle created and continue where the last backup left off. Also, all historical backups are browsable when entering Time Machine.
Note: My Mac's root volume is also not case-sensitive, so I assume this is safe for my setup.
Note 2: My Time Machine network share is a Samba/SMB share running in Linux. The disks hosting the SMB share are encrypted with LUKS, and thus, I do not use Time Machine's encrypted backup feature.
Best Answer
Sounds like you started to overwrite the drive. The data is probably still recoverable, but, as Graham said, you don't want to do anything to the drive until you attempt to recover the files.
A few options:
While I haven't used it, PhotoRec looks like a good option, if you are comfortable with the command line. Despite the name, it can recover all sorts of file types. It only reads the disk, so your data should be safe even if it is unable to recover it.
For a graphical (and more expensive option), Disk Drill has gotten good reviews. It's pricey at $89, but you can use a free version to preview what it would be able to recover.
If you're in the market for a general disk protection utility, Tech Tool Pro 7 has a data recovery mode. Also, you can set it up to monitor your drives going forward, which would protect against future errors.
DrDD won't completely solve your problem, but it is a graphical way of copying the raw data off your Time Machine drive. I'm not 100% sure that the above programs will be able to read from the copy, but if they can, it would give you another margin of safety. It's also designed to protect your data on failing hard drives, so it should be safe to use in your case.
Hope this helps.