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.

Now I have two partitions for each computer to backup there. Backups from my mac book are always big (about one gigabyte minimum), backups from second machine are mostly small (rarely more than few megabytes). If I use one partition for both machines, how would it delete old backups, when there will not be enough space? Will it delete the oldest of all backups or oldest of backups of machine which is currently backuping?

share|improve this question
    
I'd have to guess, but removing other people's backups would be insane. So I really hope it only deletes your own. Otherwise a few large backups (video editing comes to mind) would be able to completely delete everything the other user had, since he didn't connect for a week. –  Daniel Beck Oct 26 '10 at 19:53
    
@Daniel Beck: good point, but also it means that that one machine will have backups for example for a month or less and the other will have backups for a year. –  tig Oct 27 '10 at 11:29
    
As an aside, if you're wondering why your backups are so large: see Hungry Time Machine here on Super User, and What is Time Machine doing? on Server Fault. Note that sometimes you need to run tools as root, like to see MySQL log files and data files being written to the backup. –  Arjan Dec 20 '10 at 8:37
add comment

3 Answers

up vote 3 down vote accepted

The backups are only deleted from the current computer's backup collection. Since Time Machine is designed with the concept of being run on a regular basis, each machine would police it's own backups as disk space got tight.

share|improve this answer
add comment

Time Machine does pre-backup thinning when it needs disk space to be able to start, and post-backup thinning to delete expired hourly and daily backups after successfully completing a new backup. This only affect the backups of the computer that is currently running Time Machine.

However, when using sparse bundles (like on remote disks, not on local USB disks), then Time Machine will not reclaim disk space for things it has deleted from the sparse bundle — until Time Machine really needs it. So: it will only run something similar to hdiutil compact when it needs disk space, and even then only after first doing pre-backup thinning and noticing it has no effect:

Starting standard backup
[...]
Starting pre-backup thinning: 53.57 GB requested (including padding), 9.90 GB available
No expired backups exist - deleting oldest backups to make room
Deleted backup [...] 2007-12-20-172543: 9.90 GB now available
Deleted backup [...] 2007-12-31-005523: 9.90 GB now available
Deleted 2 backups: oldest backup is now 8 Jan 2008
Stopping backup.
Backup canceled.
Ejected Time Machine disk image.
Compacting backup disk image to recover free space
Completed backup disk image compaction
Starting standard backup
[...]
Starting pre-backup thinning: 53.57 GB requested (including padding), 12.75 GB available
[... and so on]

But: it does not compact after removing expired backups during post-backup thinning. And it will only reclaim space for the sparse bundle that belongs to the computer that is running the backup.

Now, when the disk runs full when the computer with the small backups is running a backup, then it might have to delete a few of its own backups to get the required free space, even when unused space is still present in the other computer's sparse bundle.

So, when using sparse bundles, then when you know that the disk is about to run out of space, manually compacting the sparse bundles might be a good idea. See How to reclaim all/most free space from a sparsebundle on OS X on Server Fault.

share|improve this answer
    
Good point, thank you! –  tig Dec 20 '10 at 7:57
add comment

By default, each backup resides in its own .sparsebundle container (growable disk image) and each Time Machine instance only mounts, uses and deletes from its own.

Technical note: The way backups are handled in Time Machine, one image of the drive is taken first, and every subsequent update has hard links to existing data if that data hasn't changed. Whenever it's time to evict old backups, the link counter for each file is decremented once for every backup removed — when it gets to 0, the space becomes free. The entire operation isn't very long, but multiple backups may be removed at once.

Since the entire free disk space is considered when deleting backups, one machine may have more backups (going back further) stored than the other, depending on how often you backup. If you're only interested in the latest version of either machine, this doesn't matter, otherwise you may want to partition the backup drive and assign each machine to its own partition.

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.