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:

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

  • Add an ampersand to the end if you want to be able to log out immediately, which sends the process into the background, 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.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

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

3 Comments

» Comments RSS Feed

  1. 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.

  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. BetterWay says:

    sudo tmutil disable
    sudo tmutil enable

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

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

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