Terminal 101: Checking on Local Backups in Time Machine
Posted 06/25/2012 at 12:45pm
| by Cory Bohon
Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!
Last week in our Terminal 101 column, we talked about how to use the basic features of the tmutil program, which allows you to use Time Machine through the command line interface. This week, we’re going to cover how to use some of the advanced features of the tmutil program to do things like checking the status on local backups, enabling and disabling them, creating a new local backup, and more.
Retrieving information about backups

If you have multiple volumes or drives connected to your Mac, you may lose track of which drive your Time Machine backup is stored on. You can figure this out with Terminal by typing in the following command:
tmutil destinationinfo
Terminal will display the name, kind, and ID of the drive that's currently backing up. If you don’t have your Time Machine volume connected and have local backups enabled, then you won’t see the Mount Point of the drive.
Locating the latest backup

Locating the last known backup of your Mac can be handy when you need to manually restore files from Time Machine. There are two ways to do so.
First, if you only wish to see the location of the last backup, use the following command:
tmutil latestbackup

If you wish to see all of the backups on the current Time Machine drive, then use this command instead:
tmutil listbackups

You can view the backups listed here in the Finder by copying the path from the Terminal window and pressing Command + Shift + G in the Finder and pasting the path address.
Enabling and disabling local backups

Local backups are intended to provide you access to Time Machine even when your external hard drive is not plugged in. However, when local backups are enabled, hard drive space on your Mac is set aside for use by creating a “local Time Machine snapshot” that is essentially tinyer versions of the Time Machine backups that are being modified.
You can turn off this feature by issuing the following command in the Terminal:
sudo tmutil disablelocal
This will turn off the ability for Time Machine to create local snapshots on your Mac’s internal drive, and will also perform an automatic cleanup of the accumulated local snapshot data.
To turn the feature back on, issue this command:
sudo tmutil enablelocal
For each of these commands, you will be required to enter your administrator password.
Creating a new local snapshot

If you choose to use the local Time Machine snapshot feature, then you may want to trigger a new snapshot to be taken and backed up on command (just as you would with the standard Time Machine backups). To create a new local snapshot whenever you desire, enter this command into the terminal:
tmutil snapshot
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author, Cory Bohon on Twitter.