Macos – Efficiently and Safely Deleting or Un-Trashing Time Machine Backups

aclmacospermissionstime-machinetrash

I have been storing my Time Machine backups on an external drive. Noticing that space was getting low, I viewed that external drive in the Finder, selected a bunch of the folders and moved them to the Trash.

I now realize this was stupid of me, for a number of reasons:

  • Time Machine will delete old backups properly, when it's running low on space.
  • It is my understanding now that all Time Machine backups after the initial one are a diff of the previous backup, not a disk image. So deleting these folders would render subsequent backups useless (I think).
  • The "Preparing to empty the Trash … Items to delete: [number]" dialogue got up to 1.5 million files(!) before I stopped it. And I don't have permission, even as root, to rm -rf them.
  • I also don't have permission, even as root, to mv files from /Volumes/Time\ Machine\ Backups/.Trashes/ back to their original location. I did a little reading about Access Control Lists and am wary of making yet more mistakes by fooling around with them.

So, does anyone have insight or advice on how best to deal with this problem?

Specifically, I am wondering:

  • Would deleting the items in the Trash render my existing Time Machine backups useless?
  • If deleting those folders currently in the Trash *is& OK, how would I do so efficiently?
  • If deleting those folders would create problems, how can I move them back to their original location?

Thanks in advance for any help you guys can offer.

Best Answer

It is my understanding now that all Time Machine backups after the initial one are a diff of the previous backup, not a disk image. So deleting these folders would render subsequent backups useless (I think).

Fortunately that is not the case. Time Machine backups are complete backups, but they share the disk space with previous backups for the files that have not changed (using hard links). As long as any of the hard links is available, you can access the file.

So if you have a big file in Monday's backup, and the file has not changed on Tuesday, the same file will exist in Tuesday's backup as well, but it will not take up any extra disk space. You can safely delete Monday's backup, and the "copy" for Tuesday will continue to work.

The "Preparing to empty the Trash ... Items to delete: [number]" dialogue got up to 1.5 million files(!) before I stopped it. And I don't have permission, even as root, to rm -rf them.

Yes, because of these hard links, there is an insane number of files in a Time Machine backup (they are all counted so many times). You cannot use simple file-based tools on a Time Machine backup, you need something that understands (and preserves) the hard links. For example, if you tried to copy all the files on a Time Machine disk you would end up with huge duplication. The only way to copy/backup a Time Machine is cloning the disk structure (using something like Disk Utility).

Related Question