Start a Time Machine Backup on a Remote Mac 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:
- 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
tmutil startbackup
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.

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.
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.
sudo tmutil disable
sudo tmutil enable
Backup should start running in 90 seconds and you can logoff immediately.