Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

4 Answers

up vote 6 down vote accepted

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).

share|improve this answer
1  
+1 Much better explained than how I was trying to word it. –  Stephen Jennings Feb 23 '10 at 1:33
add comment

Well, first off, for future reference on a better way to clean up files on a Time Machine Backup, see this thread: http://superuser.com/questions/111363/how-do-i-trim-my-time-machine-backups-and-find-and-exclude-frequently-updated-lar/111364#111364

Now, as far as your current situation, if your attempt to empty the trash already removed some files, any damage is probably already done. Anything that is still in the trash, you might be able to go and un-delete them. If you are using Leopard, you will need to do this manually, but if you are using Snow Leopard you can go into the trash, select all of the files, control click them and select "Put Back".

Once you have reversed the damage as much as possible, I would click on Time Machine in the menu bar and try selecting enter time machine. See what it shows you. Poke around and see if your old stuff is still there.

I don't really know of a good way to reverse what has been deleted, some other users might. It may end up being that the damage you did seems to not be a huge deal, and probably by running subsequent backups you would be alright. I guess it would be worth a shot.

Personally, if it was me and nothing on the backup was too dire, I would probably buy a new disk, backup using that until I hadn't accessed the current one is x amount of time and then erase and use the old one. You may prefer not doing that though.

share|improve this answer
    
Thanks for the quick response -- FWIW, I am using 10.5.8, not Snow Leopard. :( And yeah -- it wouldn't be the end of the world if I bought a new external disk and used that one, going forward. (Lesson learned, I guess.) –  user29099 Feb 23 '10 at 1:22
    
I mean, if you KNOW you dont care about this disk, you could just wipe the current backup disk and start fresh. I guess it depends if you want the safety net of what is still good. Did you try running a backup or entering time machine to see what is missing or if that will work at all? It's possible that you just deleted the date of some particular days, but by and large your data is still there. –  finiteloop Feb 23 '10 at 1:27
    
Sorry- I couldn't figure out how to edit my last comment, "date" should read "data" –  finiteloop Feb 23 '10 at 1:34
add comment

Wow ... on a lark, I tried just moving the folders back to their original location (using the finder) and it worked. I don't know what was different from previous attempts. Anyhow, thanks for your help @segfault. I believe I'm good to go -- Time Machine lets me browse old backups -- and I no longer have a Trash too big to empty.

share|improve this answer
1  
Out of curiosity, if my answer resolved this issue, why did someone else receive best answer? –  finiteloop Feb 25 '10 at 21:31
add comment

I had luck solving this problem by logging in as root:

su

and then typing this in terminal:

cd /Volumes/<name of your drive>/.Trashes

then you can do an

ls -la

which will show you the name of the trash directory (in my case 501) which I then deleted using this command

rm -rf 501

which, like the finder 'Empty Trash' command, takes a while, but at least it doesn't screw up and hang forever. Plus, this has the added benefit of NOT having to reformat your drive.

Originally Posted by auralox

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.