Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Remove specific files from Time Machine backups

My Time Capsule is getting pretty full and I know it will delete the oldest backup first, but looking at the oldest backup via TM, its full of some huge video files which just happen to be in the next three or four backups as well - but not exactly the same as they were edited each time.

At 16Gb a shot they would be ideal candidates for trashing without deleting the rest of the backup. Is it possible to delete individual files within a backup leaving the rest unaffected ?

MacBook Pro 15", Mac OS X (10.6.1), iPhone 3GS 32G

Posted on Sep 22, 2009 11:20 AM

Reply
Question marked as Best reply

Posted on Sep 22, 2009 11:23 AM

enter TM, scroll back in time and select a file you want to delete. then click on the "gears" action button in finder's toolbar and select "delete all backups of this item".
13 replies

Sep 22, 2009 11:27 AM in response to Graham Outterside

Graham Outterside wrote:
My Time Capsule is getting pretty full and I know it will delete the oldest backup first, but looking at the oldest backup via TM, its full of some huge video files which just happen to be in the next three or four backups as well - but not exactly the same as they were edited each time.

At 16Gb a shot they would be ideal candidates for trashing without deleting the rest of the backup. Is it possible to delete individual files within a backup leaving the rest unaffected ?


If they all have the *exact same name,* then no. There is a way to delete all backups of a selected item, but you can't pick and choose among different versions with the same name.

But that may not be as much of a problem as it seems; when TM deletes the oldest backup, it deletes the record of that backup, but only the copies of items that appear on *no other remaining backup;* so the backup of the oldest version of that file will go away, but not much else may be deleted.

Sep 23, 2009 2:48 PM in response to Pondini

I managed to remove the relevant files off the oldest backup copies as far as I can tell - they do seem to have disappeared from view. After a few restarts of the computer however I notice that the sparebundle file is still the same size.

Looking at the backup logs for subsequent backups I got;

Starting standard backup
....................
....................
No pre-backup thinning needed: 1.18 GB requested (including padding), 11.57 GB available
Copied 4730 files (344.7 MB) from volume Macintosh HD.
No pre-backup thinning needed: 1.27 GB requested (including padding), 11.57 GB available
Copied 243 files (416.4 MB) from volume Macintosh HD.
Starting post-backup thinning
Deleted backup /Volumes/Backup of Graham Outterside’s Computer/Backups.backupdb/Graham Outterside’s Computer/2009-09-22-212457: 11.57 GB now available
Post-back up thinning complete: 1 expired backups removed
Backup completed successfully.
Ejected Time Machine disk image.
Ejected Time Machine network volume.

Whats interesting is that TM is deleting the oldest backup POST SL and not going back to try and delete the oldest backup which is May 2008.

Secondly the files deleted from the May June and July 2008 backups have not affected the sparsebundle file size.

I am fairly sure its a'user account'issue and this user cannot delete the oldest backup or thin down the sparsebundle as its owned by the older pre-SL user.

not sure where to go from here to get any hard disc space back as its just going to keep deleting recent copies in prefernce to old ones.

Sep 23, 2009 3:10 PM in response to Graham Outterside

Graham Outterside wrote:
I managed to remove the relevant files off the oldest backup copies as far as I can tell - they do seem to have disappeared from view. After a few restarts of the computer however I notice that the sparebundle file is still the same size.

that's because a sparse bundle does not automatically compact when you delete some of the contents. you can compact it from terminal if you really want to but there should be no need. new backups will take the freed space in the bundle eventually.

to compact a sparse bundle you need to run the following terminal command

sudo hdiutil compact /path/to/sparsebundle

put the correct unix path to the sparse bundle in the command. an easy way to get it is to drag the bundle to the terminal window. make sure that all the space in the command are correct.
Looking at the backup logs for subsequent backups I got;

Starting standard backup
....................
....................
No pre-backup thinning needed: 1.18 GB requested (including padding), 11.57 GB available
Copied 4730 files (344.7 MB) from volume Macintosh HD.
No pre-backup thinning needed: 1.27 GB requested (including padding), 11.57 GB available
Copied 243 files (416.4 MB) from volume Macintosh HD.
Starting post-backup thinning
Deleted backup /Volumes/Backup of Graham Outterside’s Computer/Backups.backupdb/Graham Outterside’s Computer/2009-09-22-212457: 11.57 GB now available
Post-back up thinning complete: 1 expired backups removed
Backup completed successfully.
Ejected Time Machine disk image.
Ejected Time Machine network volume.

Whats interesting is that TM is deleting the oldest backup POST SL and not going back to try and delete the oldest backup which is May 2008.

I don't know why this would happen. did you do a regular install of SL? did you make any hardware changes to the computer?
Secondly the files deleted from the May June and July 2008 backups have not affected the sparsebundle file size.

I am fairly sure its a'user account'issue and this user cannot delete the oldest backup or thin down the sparsebundle as its owned by the older pre-SL user.

no. this has nothing to do with user account issues. TM runs for the whole computer as root and does not care about individual accounts.
not sure where to go from here to get any hard disc space back as its just going to keep deleting recent copies in prefernce to old ones.

Sep 24, 2009 4:36 AM in response to V.K.

Thank you - I will try some of this tonight.

I did however standard Sl install and all went near flawlessly. No hardware was changed at all. The one and only issue I had was with a small flash based chat application which had corrupted/invisible characters. I tried all the standard solutions (reinstall flash, update flash, delete plist etc) but after some sugestions here I found that if I created a new user, the ewn user worked perfectly so I manually migrated any data between users, and basically stopped using the original user.

maybe my TM backups are not bein done 'as root' for the current backups whereas they were with the original user ? Is there a way I can check this or force it to access it as 'root' ?

When I connect to the Time Capsule logged in as the original user, I can see and access all the pages of the TM backups in the Star Wars view. When I log in under the new user, I can only access the Star Wars pages of the post SL backup.

Sep 24, 2009 6:10 AM in response to Graham Outterside

Graham Outterside wrote:
Thank you - I will try some of this tonight.

I did however standard Sl install and all went near flawlessly. No hardware was changed at all. The one and only issue I had was with a small flash based chat application which had corrupted/invisible characters. I tried all the standard solutions (reinstall flash, update flash, delete plist etc) but after some sugestions here I found that if I created a new user, the ewn user worked perfectly so I manually migrated any data between users, and basically stopped using the original user.

maybe my TM backups are not bein done 'as root' for the current backups whereas they were with the original user ?



no. absolutely impossible. you are really on the wrong track here.

Is there a way I can check this or force it to access it as 'root' ?

start a TM backup and look at the activity monitor. it will list backupd process running as root.
When I connect to the Time Capsule logged in as the original user, I can see and access all the pages of the TM backups in the Star Wars view. When I log in under the new user, I can only access the Star Wars pages of the post SL backup.

that's correct behavior if the new user was only created post SL. it's home directory did not exist before so it will only show its backups back to the moment it existed. if you first switch to a directory that was backed up for all times, like the top level of the hard drive it will show all backups.

Sep 24, 2009 8:18 AM in response to V.K.

V.K. wrote:

that's correct behavior if the new user was only created post SL. it's home directory did not exist before so it will only show its backups back to the moment it existed. if you first switch to a directory that was backed up for all times, like the top level of the hard drive it will show all backups.


Spot on - thank you ! I can now get at the other locations. I'll see if the next few backups result in the oldest backup being pruned. I suspect however I'll be back judging by the last backup.

Sep 24, 2009 1:48 PM in response to Graham Outterside

I'm back .... 😟

The next backup log went as follows;

Backing up to: /Volumes/..................../Backups.backupdb
No pre-backup thinning needed: 803.2 MB requested (including padding), 11.08 GB available
Copied 4748 files (3.4 MB) from volume Macintosh HD.
No pre-backup thinning needed: 800.9 MB requested (including padding), 11.08 GB available
Copied 230 files (1.5 MB) from volume Macintosh HD.
Starting post-backup thinning
*Deleted backup /Volumes/................/Backups.backupdb/Graham Outterside’s Computer/2009-09-23-211043: 11.08 GB now available*
Post-back up thinning complete: 1 expired backups removed
Backup completed successfully.
Ejected Time Machine disk image.
Ejected Time Machine network volume.

So it appears its still deleting the recent backups post-SL rather than the oldest, pre-SL ones ?

Sep 24, 2009 1:56 PM in response to Graham Outterside

Graham Outterside wrote:
. . .
*Deleted backup /Volumes/................/Backups.backupdb/Graham Outterside’s Computer/2009-09-23-211043: 11.08 GB now available*
Post-back up thinning complete: 1 expired backups removed


That's exactly what it's supposed to do. Notice the phrase "expired backups"?

TM does not keep all backups until it runs out of room. As noted on the TM Preferences panel, in slightly different words, it keeps one per week for as long as there's room; one per day (the first) for a month; all others for 24 hours.

There is, no doubt, a backup from earlier on the 23rd still on your TM drive, and it will be there for at least a month.

Sep 24, 2009 2:06 PM in response to Pondini

Not sure I understand the explanation ...... if its short of space its logical to delete the oldest data surely ? The oldest backup data is May 2008, then June 2008, then July, September. I'm not clear at what point it will ever delete the oldest backups when its short of space as there is always something newer which seems counter-intuitive to me.

Sep 24, 2009 2:15 PM in response to Graham Outterside

Graham Outterside wrote:
Not sure I understand the explanation ...... if its short of space its logical to delete the oldest data surely ? The oldest backup data is May 2008, then June 2008, then July, September. I'm not clear at what point it will ever delete the oldest backups when its short of space as there is always something newer which seems counter-intuitive to me.


Try it this way:

TM keeps one backup per week for as long as there's room.

It keeps the first backup of each day for a month.

All others are deleted after 24 hours.

It's actually a fairly clever way to keep many recent backups, and a few fairly old ones. That way, you have an excellent chance of recovering a previous copy of something deleted or changed in error, as most likely you'll discover that in the first 24 hours; if not, there's still one per day for the previous month.

Sep 24, 2009 2:17 PM in response to Graham Outterside

It will start deleting the oldest backups only when it completely runs out of room on the TM drive. otherwise it simply thins expired backups as pondini explained. what you see appears normal to me. thinning is different from deleting oldest backups to make more room. TM thins backups all the time even if there is plenty of free space left. it makes hourly backups but after 24 hours it deletes all but one backup for any given day and after 30 days it deletes all but one daily backup for any given week. that's thinning and that's what you are seeing in the logs.

Remove specific files from Time Machine backups

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.