Skip to content

Instantly share code, notes, and snippets.

@ssp
Created February 19, 2010 22:14
Show Gist options
  • Save ssp/309281 to your computer and use it in GitHub Desktop.
Save ssp/309281 to your computer and use it in GitHub Desktop.
Toggle Time Machine using the defaults command. It may (or may not) be a good idea to run backupd-helper in some way afterwards. See http://github.com/ssp/TMSwitch for slightly more elaborate Time Machine fiddling.
/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper -wake
# Run by Time Machine when the system wakes from sleep.
# The command also understands a -attach parameter.
defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -bool NO
defaults write /Library/Preferences/com.apple.TimeMachine AutoBackup -bool YES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment