Compare Time Machine Backups and List All Changes Between Backups

Jan 21, 2012 - 4 Comments

Time Machine Modern versions of Mac OS X include a great tool called tmutil that lets you interact with with Time Machine from the command line. It’s a powerful utility that has a ton of options, and we’ve used it before to disable local snapshots, but for the purposes here we are going to use tmutil to compare Time Machine backups and list changes between the compared backups.

Launch the Terminal from /Applications/Utitilities/ and let’s get started.

How to Compare Latest Time Machine Backup to Macs Current State File by File

The simplest command compares the most recent Time Machine snapshop with what is currently on the Mac:

tmutil compare

The output can be fairly lengthy depending on how long you go between backups and how much data has changed. This is basically using ‘diff’ on the backup and current state, giving you a file by file breakdown of the differences. Files and paths with a + (plus) in front of them indicate it is new, files with a – (minus) in front indicate it has been removed, and a ! (bang) indicates the file has changed.

tmutil compare output

You’ll also see the size each individual difference, and at the end of the commands output you’ll find a summary of total sizes of what has been added, removed, and changed.

If you only want to compare file sizes, use:

tmutil compare -s

How to Compare Past Time Machine Backup to Current System State

Finally, if you’re wondering how an older backup compares to the current system state, you can specify the path to the old backup:

tmutil compare /Volumes/TimeMachineDriveName/Backups.backupdb/Macintosh\ HD/2011-11-02-129198

Replace “TimeMachineDriveName” with the name of your backup drive, replace “Macintosh HD” with the name of the primary drive, and replace the date on the end with which date you want to compare that is stored within the Time Machine backups directory.

.

Related articles:

Posted by: William Pearson in Command Line, Mac OS, Tips & Tricks

4 Comments

» Comments RSS Feed

  1. Kieran says:

    This was very helpful in comparing two backups to determine which one was best for restoring. Thanks!

  2. Dr Duke says:

    Thanks a lot for your tip ;)

  3. adam says:

    Good Tips thanks :)

  4. Tom says:

    Thanks Will. I just had a Time Capsule backup get corrupted. This will come in handy with the .sparsebundle I had to copy off to another external drive. Good thing I stagger the backups between an external drive and the Time Capsule. Its hard to understand why the whole backup is replaced when it get’s corrupted….. Not sure if i would have bought the TimeCapsule had I known this.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

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

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site