Restore Time Machine backup from Terminal

Sometimes you need to quickly restore a file from your macOS Time Machine backups without using the pretty graphical interface.

  1. Commands
  2. Related stuff


First retrieve the list of all available backups:

tmutil listbackups

When you get an error “No machine directory found for host” it probably means Time Machine is doing a backup or verification at the moment. Try again later.

You can check the status and get an ETA with:

tmutil status

Restore your file:


Note: don’t forget to either wrap the paths in quotes or escape all spaces and special characters!


/Volumes/Time Machine Backups/Backups.backupdb/ComputerName/2017-10-19-064032

The starting path can be different for non-English installations. For example on Dutch macOS the path starts with /Volumes/Time Machine-reservekopiën.


/Macintosh HD/Users/username/Documents/my_lost.doc

Here the start can also be different when you have named you Mac’s disk differently.



So the full restore command becomes:

tmutil restore '/Volumes/Time Machine Backups/Backups.backupdb/ComputerName/2017-10-19-064032/Macintosh HD/Users/username/Documents/my_lost.doc' '~/Documents/my_lost_doc'

Based on: Hacks for Macs

Leave a Reply

Your email address will not be published. Required fields are marked *