User Tools

Site Tools



Download Command Line Tool 32Kb(v0.5.1 beta, Feb 2009) - 10.5 Leopard only.

Sep '11: NOTE: If you're running Lion then you should instead investigate the builtin command 'tmutil'.


  • Allows basic cvs style operations on Time Machine volumes
  • Read-only - does not modify any Time Machine files or settings
  • Allows various status operations

Why? As someone who is often in a Terminal environment I become frustrated with the Time Machine GUI and found it totally inadequate for when I needed to quickly determine what had been backed up and what had changed.

Example Usage

Usage: tms <command> 
  help      - instructions on usage
  version   - print the current version of this tool
  disk      - print the current disk
  disks     - print list of all Time Machine disks
  volumes   - print list of all volumes
  machine   - print the current machine
  machines  - print the list of all machines backed up on the current disk
  status    - print the current configuration
  snapshots - print the list of snapshots for the current machine on the current disk
  snaplog {<num>} - print the log for the given (or latest) snapshot
  log <file>+     - print revision information for the given files
  diff [-u] <file> {<num>} {<num>} - print file diff with the given (or latest) snapshot, or between two snapshots
  delta [-size] <num> {<num}       - print the difference between two snapshots

The default disk and/or machine can be overridden by first adding:

  -disk (<name>|#)    - where name is of the form /Volumes/mybackupdisk, or # is the nth disk as listed by 'tms disks'
  -machine (<name>|#) - where name is the machine name, or # is the nth machine as listed by 'tms machines'


Find out how many unique versions of a file really exist

[RobsG5] user% tms log tms.c
/Volumes/disk1/XX/tms/tms.c: num=59 oldest=2008-05-02-00:04:25 newest=2008-05-03-18:42:40
/Volumes/disk1/XX/tms/tms.c: num=63 oldest=2008-05-05-14:11:57 newest=2008-05-05-14:12:37
/Volumes/disk1/XX/tms/tms.c: num=64 oldest=2008-05-05-15:08:27 newest=Current


Determine how a file has changed from the current active version

  • Uses /usr/bin/diff to process the output
[RobsG5] user% tms diff tms.c
<  XX
>  YY
<  ZZ


Find out how many snapshots Time Machine is maintaining

[RobsG5] user% tms snapshots
/XX/2008-05-05-150832: num=64 state=4 type=2 ver=1 start=2008-05-05-15:08:27.899941 complete=2008-05-05-15:08:32.026552
/XX/2008-05-05-141237: num=63 state=4 type=3 ver=1 start=2008-05-05-14:12:35.704837 complete=2008-05-05-14:12:37.528816
/XX/2008-05-03-184240: num=62 state=4 type=3 ver=1 start=2008-05-03-18:42:36.938152 complete=2008-05-03-18:42:40.010305
/XX/2008-05-02-000446: num=59 state=4 type=1 ver=1 start=2008-05-02-00:04:44.635859 complete=2008-05-02-00:04:46.422558
/XX/2008-05-01-102433: num=50 state=4 type=1 ver=1 start=2008-05-01-10:24:31.629343 complete=2008-05-01-10:24:33.113212
/XX/2008-04-29-180729: num=49 state=4 type=1 ver=1 start=2008-04-29-18:07:03.455178 complete=2008-04-29-18:07:29.084749


Find out general Time Machine status

[RobsG5] user% tms status
/Volumes/disk1: name=disk1 uuid=F04D3A60-2E6E-348D-A6DF-DF7559BE6CEE
/Volumes/disk1/Backups.backupdb/RobsG5: name=RobsG5 mac=XX:XX:XX:XX:XX:XX
enabled=1 online=1
/Volumes/disk1/Backups.backupdb/RobsG5/2008-05-05-161725: num=65 state=4 type=2 ver=1 start=2008-05-05-16:17:23.050914 complete=2008-05-05-16:17:25.161527


Find out the difference between two snapshots

[RobsG5] user% tms delta 76
delta: 76 vs 77
/Volumes/Leopard/ !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/.DS_Store: !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/releasing/.DS_Store: !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/releasing/tms/.DS_Store: !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/releasing/tms/readme.rtf: !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/releasing/tms/tms: !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/releasing/ !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/source/.DS_Store: !=
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/source/tms: ->
/Volumes/Leopard/Users/rpointon/Desktop/products/tms/source/tms.c: !=

Release Notes

  • 0.5.1 Beta will now expire in Snow Leopard or 2010
  • 0.5.0 Support for 10.5.4
  • 0.4.5 Fixed filename comparison bug, added '-size' option to delta
  • 0.4.4 Now correctly recognises Time Capsule disks as being mounted
  • 0.4.3 Handle case where disk contains both local and Time Capsule data, can now override disk/machine by number
  • 0.4.2 Minor bug fixes, and working Time Capsule support
  • 0.3.5 Bug fixes, and graceful failure on 10.4
  • 0.3 hypothetical Time Capsule support - untested and we require feedback
  • 0.2.4 Added '-u' options to 'diff'
  • 0.2.3 Fixed bug resulting from non-HFS volumes
  • 0.2.1 Improved efficiency of 'delta' command and fixes bug where a few cases were missed
  • 0.2 Added snapshot 'delta' command
  • 0.1 Initial public release

Known Issues

  • 'diff' is known to give incorrect results
  • Time Capsule support is untested/unknown
  • 'delta' command will assume files/dirs it can't read must be different, so sudo tms to scan everything

Future Plans

  • Contact us if you have any feature requests
  • tms will remain as beta software until such time as we produce a gui frontend, during this beta period output formats and functionality may change radically, and betas may expire or refuse to function on untested OSX versions.
software/misc/tms.txt ยท Last modified: 2011/09/19 01:22 by robert

©fernLightning 2014 Recent changes RSS feed Powered by PHP Made on a Mac Valid XHTML 1.0 Valid CSS Terms Of Use/Privacy/Credits