By default, Time Machine will create backups every hour. It saves the last 24 hours worth of hourly backups, the last thirty days of daily backups, and then uses the rest of your disk space to store one backup a week. If you don’t love this default behavior, you can customize Time Machine using freeware and Terminal commands.
Customize Time Machine’s Schedule with TimeMachineEditor
You can use TimeMachineEditor to customize Time Machine’s backup schedule.
1. Download TimeMachineEditor from the developer’s website. The program is compatible with Mountain Lion (10.8) and onwards.
2. By default TimeMachineEditor is set to “When Inactive.”
This means that your Time Machine backup will only run when your computer isn’t doing much. Bear in mind, this isn’t really a great idea. It means that when you’re making the most changes to your data, Time Machine won’t be making backups. However, if your computer is getting long in the tooth, Time Machine backups might be so resource-intensive that they need to be postponed until you’re done with your work.
3. The hourly bracket below allows you to set the time interval in which you’d like backups to be postponed.
No backups will occur during these times. You can use this to avoid making “empty” backups that wake up your computer just to backup virtually unchanged versions of files.
4. To customize Time Machine’s schedule, click the main drop down menu next to “Mode of operation” and chose “Interval.”
Now, you can set time intervals in hours, days or weeks between backups. Backups can’t be set more frequently than once per hour.
5. To set a more complex schedule, click the drop down menu and choose “Calendar Interval.”
Here, you can set a schedule like you might do with a third-party backup tool. You can set as many conditions as you want, choosing several times per day or per week to create backups.
Customize Time Machine From the Command Line
You can get your hands dirty with some command line Time Machine hacks. This is awesome for writing shell scripts that customize Time Machine settings based on programmatic input. If you’re not that familiar with Terminal, brush up on the basics before you try out the commands below.
Customize Time Machine Schedule with the Command Line
You can customize Time Machine’s schedule from the command line as well, using a command like the one below:
sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 7200
This changes the defaults of com.apple.backupd-auto, adjusting the time between backups. The digits at the end of the command (7200 in the example) are the most important. They represents seconds between backups. By default, this is set to 3600 seconds, or one hour (1 hour x 60 minutes x 60 seconds). If you want to adjust it, just do the necessary unit conversion to make sure you’ve got the right number of seconds and plug it in to the end of the above command.
After you enter that command, you’ll need to type your admin password, thanks to
Enable/Disable Time Machine
The most basic operation is turning Time Machine on and off from the command line. Use the
tmutil command as below.
sudo tmutil enable
If Time Machine is off, this will turn it on. You’ll need to type in your password afterwards, thanks to
sudo tmutil disable
As you might guess, this command turns Time Machine off.
Set and Remove Backup Destinations
You’ll need to set a Time Machine destination before you can turn it on. You can do that from the command line with the command below.
tmutil setdestination "WD Backup"
This command will set the backup drive to the hard drive attached to your computer named WD Backup. The drive needs to be connected to your computer to set properly.
If you want to change from one backup destination to another, you’ll need to remove your current backup destination first. Use the
removedestination command to get rid of your current setting before setting a new one.
Start and Stop Time Machine Backups
In addition to enabling and disabling the entire service, you can start and stop individual Time Machine backups from the command line.
As you might guess from reading, those commands start and stop a backup, respectively. This just presses “go” or “stop” virtually, like clicking “Backup Now” or “Stop Backup” in Time Machine’s menu bar icon.
Save Disk Space By Disabling Local Backups
Time Machine makes backups even when your Time Machine drive isn’t connected to your computer. These are called local backups, and they’re stored on your primary hard drive. They can take up a huge amount of space on storage-starved laptops. If you’ve got a big “Other” or “Backups” section in your storage details, these might be the culprit. They’re actually a clever idea, providing access to previous versions of files even when your backup drive isn’t connected. But if you can’t spare the space, you can disable the service with the command below.
sudo tmutil disablelocal
That command will turn off local backups. You can turn them back on with the command below.
sudo tmutil enablelocal
If you want to exclude specific folders and their contents from your backup, you can use this command.
sudo tmutil addexclusion ~/Downloads
As you can tell by reading, this will exclude the Downloads folder stored in the user’s home directory from any future Time Machine backups. It will not affect any backups that have already been made. You can set any directory to be excluded by swapping
~/Downloads for any directory path.
You might also like these posts: