Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.7: Use local Time Machine as an instant safety net System 10.7
Mac OS X 10.7 includes a new facility to make Time Machine backups on the local disk. You can make use of this feature to create snapshots of the current disk status, allowing you to recover instantly from disaster.

Local Time Machine backups should be enabled by default on portable Macs, but on desktop machines you'll have to enable them manually, in Terminal:

sudo tmutil enablelocal

Once local backups are enabled, you can make a snapshot almost instantaneously by issuing this command:

sudo tmutil snapshot

This is a very useful (and prudent) thing to do immediately before embarking on some course of action that could have potentially disastrous results. If disaster does strike, you can simply enter Time Machine and restore the affected files or folders to their state at the time that you took the snapshot.

Since the backup is local, you can do this even if you're not connected to your Time Machine drive.

[crarko adds: If this is a full Time Machine backup expect it to take up a lot of disk space. I don't have enough free space to try this but a look at man tmutil confirms these options. There are many others, including setting up exclusions, so it would be well worth a person's time to look over these man pages to get a better handle on this utility.]
    •    
  • Currently 3.57 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[13,228 views]  

10.7: Use local Time Machine as an instant safety net | 14 comments | Create New Account
Click here to return to the '10.7: Use local Time Machine as an instant safety net' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
this has always been possible
Authored by: V.K. on Aug 15, '11 09:17:21AM

TM backups to local disks have been possible from the very beginning. I've been doing just that on my two Mac Pros ever since I installed Leopard in 2007.
Lion provides command line tools for managing TM backups which should help administrators but there is nothing new as far as backing up to local disks.



[ Reply to This | # ]
this has always been possible
Authored by: leamanc on Aug 15, '11 10:23:39AM

I think it should be worded that TM can now back up to your boot volume, your current live system backing up to its own OS disk. Could you do that before Lion? I'm honestly not sure.



[ Reply to This | # ]
You are right.
Authored by: V.K. on Aug 15, '11 01:44:11PM

Sorry, I didn't understand that from the way the hint was worded. Yes, that's a new ability. You definitely could not do that before Lion. I can see this being somewhat useful on portable macs which can be away from their backup drives for extended periods of time but I don't see why you'd ever want to use TM in such a way on a desktop Mac. I really can't see a scenario where that would make sense. I can certainly see why this ability is turned off by default on desktop macs.



[ Reply to This | # ]
You are right.
Authored by: leamanc on Aug 15, '11 04:40:22PM

Yeah, I could see this being of limited utility on a desktop Mac, and using up way too much space on your boot drive in any case. I could see it being most useful if you were working on a project and wanted to implement your own version control system by excluding all folders except for your project's folders.



[ Reply to This | # ]
You are right.
Authored by: dvessel on Aug 15, '11 05:20:47PM

It can take up a lot of space but it will not happen immediately. As the files are being modified, the original is backed up once for each snapshot thatís taken. Itís not like a full Time Machine backup where it actively copies your boot drive. It seems to be using fsevents to monitor changes and moves the originals into /.MobileBackups sorted out by the time the snapshot was taken.

This is extremely useful even if you donít run Time Machine backups especially for short-term use.



[ Reply to This | # ]
You are right. -- sometimes
Authored by: Frederico on Aug 15, '11 06:45:50PM

There are certainly instances where this feature would have served my clients under Snow Leopard.

In one case, the iMac (single internal HDD; single partition) owner's external HDD for TM backups died, and they sent it off for warranty, as opposed to paying for a new replacement. Without borrowing another external drive (with available space and partitions) they had *ZERO* TM backups for more than two weeks. Very dangerous.

In another situation, multiple single-drive Macs were backing up to a Time Capsule (with additional external drives) and some of those TM backups became damaged/corrupt as compared to their source, and it was taking hours and hours per machine to both repair the host and the TM backup image on the TC. No current TM backups in the meantime for several days as the workflow could not be interrupted.

The ability to do a local backup in the meantime, and the later a merge of local to legacy TM backups is a *godsend* in these and many other instances.

One need not be using a portable to meet a situation where your TM drive becomes disconnected/inaccessible.

I'm anxious to move as many clients to Lion, for this, and for Versions, as soon as is practicable.



[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: cycomachead on Aug 15, '11 10:21:50AM

Be careful of disk space use, especially with SSDs or if you plan to move to one with a smaller capacity. You can very quickly fill the space on your boot disk causing other problems.



[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: polarbreeze on Nov 10, '11 07:22:31PM

Cautionary tale:
I was moving some files around to clean things up on my MBA. Once of the things I did was bring in a Parallels virtual machine file that I had saved on an external hard drive, and then, later on, move it to a different location. Unbeknownst to me, Lion's new TM caching feature was saving copies of this very large file. I ended up with 32GB of data in my .MobileBackup folder in one afernoon! When I reconnected with my TM drive, it went into frantic backup mode, presumably moving those (completely useless and redundant) 32GB of data onto my TM drive. It would have then stayed there for ever, taking up unnecessary TM space. I didn't wait long enough to see if it would then give me back the space on my MacBook drive but I assume it would have in the end. Anyway, I did the disablelocal thing and that definitely did recover my disk space.

I had another thought too. I'm in the habit of running two TM backups: one at work and one at home. I've been doing this for a long time, manually flipping the save location when I'm at home vs at work (BTW, it would be nice if OS X would take care of that for me automatically). Anyway, I'm wondering whether the .MobileBackup caching feature would confuse things in that scenario and mess up my backups. So just in case I'm leaving the feature disabled. It does seem to be a lot more trouble than it's worth.



[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: nicholfd on Aug 16, '11 04:53:30AM

Regarding crarko comment about disk space - If this is a true "Snapshot", it will consume very little disk space initially. It is just a representation of how the disk is at the time the snapshot is taken.

Only the files that change after the snapshot is taken, will consume additional disk space.



[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: joh on Aug 16, '11 07:52:00AM

Hmm, is there any way to *disable* mobile backups?



[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: V.K. on Aug 18, '11 11:57:05AM
yes, you can run this in terminal

sudo tmutil disablelocal
Note that this will not only disable local backups but also trash the existing local backups.

[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: n6smith on Aug 20, '11 08:44:20PM

It is worth noting that Lion will not install onto a hard drive that has been used for Time Machine backups. If you try, you get a simple error msg stating you cannot install to this drive. Deleting the backup files allows you to continue. I mention this because if you use this hint and then have to reinstall Lion, you will face issues unless you delete that local backup file first.



[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: polarbreeze on Nov 10, '11 06:39:04PM

What's "new" in Lion is that TM now has a kind of caching feature that holds snapshots of your file changes even when you're not connected to your TM drive. It should have no lasting effect on disk space usage because it's just a cache.

By the same token, if you don't ever connect to your TM drive, yes, of course if will gobble up increasing amounts of your local drive because it never gets flushed. That, I think, is a mis-use of the feature.



[ Reply to This | # ]
10.7: Use local Time Machine as an instant safety net
Authored by: wjv on Jul 02, '12 12:08:28AM
I have a bad habit of not checking back on hints I've submitted!

crarko and others express concern about the disk space usage of local backups. Turns out this isn't a huge issue for two reasons: Firstly, hard links are used for local backups, so any file in a backup set that's identical to the current file on disk takes up (virtually) zero additional space. Secondly, Lion industriously and constantly prunes local backups. If you open the Console application and search the system log for mtmd (the mobile Time Machine snapshot daemon), you'll see it at work creating new snapshots and purging old ones.

Mobile snapshots are stored under /.MobileBackups. On my heavily utilised MacBook Pro, this directory is just under a gigabyte in size. Sure, that's not nothing, but on a modern hard drive it's not prohibitive either.

That said, one should probably keep in mind that very large files are not Time Machine-friendly, including large disk images or VM images. For the former, one should use a Time Machine-friendly format like a sparse bundle, and for the latter it's worth upgrading to new versions of VM environments that support non-monolithic disk images.

[ Reply to This | # ]