Start a Time Machine Backup on a Remote Mac with SSH

Nov 5, 2012 - 3 Comments

Start a remote Time Machine backup with SSH

Time Machine backups can be triggered remotely thanks to SSH (Remote Login) and the command line. This is an excellent solution to use if you left the home or office without making an important backup, though the SSH requirement does add a potential layer of complexity that may make it more appropriate for advanced users. Those who prefer the GUI might be better served starting a Time Machine backup remotely by using Remote Access from an iPhone or iPad.

Assuming you’re familiar with SSH, have Remote Login’s SSH server enabled on the target Mac, here’s all you need to do:

How to Start Time Machine Backups from the Mac Command Line on a Remote Machine

  1. Launch Terminal or open an SSH client on an iPhone or iPad, and connect to the remote Mac with SSH as usual
  2. Once logged into the remote Mac, type the following command to start a Time Machine backup:
  3. tmutil startbackup

  4. Optionally, you can add an ampersand to the end if you want to be able to log out immediately, which sends the process into the background:
    tmutil startbackup &

  5. Otherwise wait until the backup is complete and log out as usual

If for some reason you want to stop a backup currently in progress instead, the following tmutil command will do that:

tmutil stopbackup

If you are concerned about a particular file or folder being backed up, using a past tip to compare backups can also be used to verify that a recent backup is even necessary.

You probably guessed it already, but this same trick can be used to start and stop Time Machine backups locally from the command line as well.


Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks


» Comments RSS Feed

  1. BetterWay says:

    sudo tmutil disable
    sudo tmutil enable

    Backup should start running in 90 seconds and you can logoff immediately.

  2. Steve says:

    The problem with SSH is you must leave the port open on the firewall/router.

    A better way might be to set up a mail filter for a verified email address and passphrase, which triggers an Automator action.

  3. Roy says:

    The safer way to start a process and keep it running in the background while you log out:
    nohup tmutil startbackup > /dev/null 2>&1 &

    Nohup sets the SIGHUP signal (given by the logout process) to be ignored. The nomenclature after the ‘>’ sign means that all output is silently ignored. The last ampersand puts this process in the background.

Leave a Reply


Shop on and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site