AppleInsider AppleInsider Forums


Go Back   AppleInsider > Mac OS
Register Members List New Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-31-2007, 10:43 PM   #1
physguy
Registered User
 
Join Date: May 2002
Posts: 837
How to delete Time Machine backups

I'm lost in trying to delete the backup directories created by Time Machine. I've moved disks around on my network and TIme Machine doesn't seem to remember that it's backed up a given system to a given disk previously, after moving the disk to a different server. So I'm content to start over and I went to /Volumes/Backupdisk/Backups.backupdb and tried 'sudo rm -rf *' to get rid of the existing backups in preparation to start over. It wouldn't let me remove them getting the error 'Operation not permitted'. I note that 'ls -l' shows a lot of rwxr-xr-x@ with the @ sign at the end and I'm assuming that this is a hard link, but I don't know. I'm also thinking this is why rm won't work - multiple hard links?

Any unix guru out there that can help? I really don't want to re-format the disk. BTW I am currently trying to use Time Machine to delete all the file but that is taking FOR EVER and I'm not sure its actually doing anything. Its been about 30 minutes and there's been not reported increase in disk space. Its like its still preparing to delete.

Thanks in advance for any help.
physguy is offline   Reply With Quote
Old 10-31-2007, 11:01 PM   #2
mydo
Privileges Revoked
 
Join Date: Aug 2006
Posts: 1,890
One thing that Time Machine dose is create hard links to folders which isn't allowed under regular unix. So I would think that the typical command line tools would choke on these.

Doesn't the app' itself have a way to "start over"?
mydo is offline   Reply With Quote
Old 10-31-2007, 11:07 PM   #3
King Chung Huang
Registered User
 
Join Date: Nov 2001
Location: Calgary, Alberta, Canada
Posts: 342
Just drag Backups.backupdb to the Trash in Finder and Empty Trash.
King Chung Huang is offline   Reply With Quote
Old 10-31-2007, 11:23 PM   #4
physguy
Registered User
 
Join Date: May 2002
Posts: 837
Quote:
Originally Posted by King Chung Huang View Post
Just drag Backups.backupdb to the Trash in Finder and Empty Trash.
That's might work, eventually and I might try that overnight but after 1 hour of no progress I was looking for a faster way. There must be some Apple create command line tool equivalent to rm. Just don't know where/how to find it.
physguy is offline   Reply With Quote
Old 10-31-2007, 11:24 PM   #5
physguy
Registered User
 
Join Date: May 2002
Posts: 837
Quote:
Originally Posted by mydo View Post
One thing that Time Machine dose is create hard links to folders which isn't allowed under regular unix. So I would think that the typical command line tools would choke on these.

Doesn't the app' itself have a way to "start over"?
Not that I can find.
physguy is offline   Reply With Quote
Old 11-01-2007, 02:14 AM   #6
mdriftmeyer
Registered User
 
Join Date: Nov 2004
Location: Northwest
Posts: 2,858
Quote:
Originally Posted by mydo View Post
One thing that Time Machine dose is create hard links to folders which isn't allowed under regular unix. So I would think that the typical command line tools would choke on these.

Doesn't the app' itself have a way to "start over"?
Yes and no. The way Time Machine does hard links is by not allowing recursive hard links to folders. It won't allow one to do such a dumb action and that dumb action is the reason UNIX traditionally didn't include hardlinks to folders and does allow symlinks.
mdriftmeyer is offline   Reply With Quote
Old 11-01-2007, 03:38 AM   #7
iGrouch
Registered User
 
Join Date: Aug 2006
Posts: 43
Hey Guys

There may be a really easy way to do this.

Open time Machine. Go to the top level i.e the one with your HD. Navigate to the backup you want to delete and use the actions menu in the Finder toolbar. It has an option to delete the backup. Also, when using the actions menu, with a file or folder selected there is an option to delete all instances of the file/folder from all backups.


Just reading this and having stumbled upon ways to do certain things in Leopard, makes me think that it is a bit remiss of Apple not to have all these things documented for easy viewing on the net. Instead people are ending doing all sorts of crazy things when there is an easy way to do it.
iGrouch is offline   Reply With Quote
Old 11-01-2007, 04:03 AM   #8
iGrouch
Registered User
 
Join Date: Aug 2006
Posts: 43
Yup. It does work. I just deleted a rather large backup that I really didn't want and got 7.9 GB back.
iGrouch is offline   Reply With Quote
Old 11-01-2007, 10:32 AM   #9
physguy
Registered User
 
Join Date: May 2002
Posts: 837
Quote:
Originally Posted by iGrouch View Post
Yup. It does work. I just deleted a rather large backup that I really didn't want and got 7.9 GB back.
I'm glad to here it works, in principle, but so far it has not seemed to work for my 73 GB backup. I admit I only gave it 1 HOUR before frustration set it. How long did your 7.9 GB delete take???

I'm amazed that there is no command line version of 'rm' to delete these, or no information from Apple as to what the command-line version is.

BTW, if your interested, the unique identifier for a given backup is the MAC address of the Ethernet port (not AirPort) of the Computer being backed up.
physguy is offline   Reply With Quote
Old 11-01-2007, 11:06 AM   #10
iGrouch
Registered User
 
Join Date: Aug 2006
Posts: 43
The deletion of the 7.9GB update was instantaneous.
iGrouch is offline   Reply With Quote
Old 11-01-2007, 02:08 PM   #11
physguy
Registered User
 
Join Date: May 2002
Posts: 837
Quote:
Originally Posted by iGrouch View Post
The deletion of the 7.9GB update was instantaneous.
Well, I started the delete before I left for work and checked it about 3 hours later and it had completed. Now, this 73 GB was composed of about 1.3 million files, so maybe - BUT - I would really like to know how to remove these from the command line, if anyone knows.
physguy is offline   Reply With Quote
Old 11-03-2007, 07:26 PM   #12
besson3c
Registered User
 
Join Date: Nov 2001
Posts: 26
I found a solution here...

code:
sudo fsaclctl -p /Volumes/<yourVolume> -d


Will disable ACLs on this volume. Then you can do a:

code:
cd /Volumes/<yourVolume>/Backups.backupdb/<yourMachine>

code:
sudo find . -maxdepth 1 -ctime +1 -exec rm -rfv {} \;




To delete all backups created more than a day ago (or substitute any other 24 hour period as an argument for ctime)
besson3c is offline   Reply With Quote
Old 12-11-2009, 09:22 AM   #13
DeaPeaJay
Registered User
 
Join Date: Apr 2005
Location: USA - TN
Posts: 890
I was googling a way to do this and came upon this thread. Just thought I'd throw my voice in here and say that I found the quickest way was to just open Disk Utility and erase the partition of my drobo that housed my Time Machine backup. It works if Time Machine is the only thing on the drive or partition. I had a 400ish GB backup and deleting it any other way would take FOREVER.
DeaPeaJay is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:03 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.