In the end, a Time Machine backup is a collection of folders for each backup date. Each of those folders holds all† files that existed on that date. So, you can compare the names and contents of all those files with those on your Mac.
Of course, many files will change by simply using your Mac. So the results take some common sense to interpret. The best option is to close all running applications, run Time Machine, and then compare right away.
After you have connected your backup disk, use the following in Terminal to find the differences. For the cd
command below you might want to use Tab command line completion rather than just pasting the first line:
cd /Volumes/Backup*/Backups.backupdb/*/Latest/*/
echo "Current folder on backup disk: $(pwd -P)"
sudo diff -qr . / 2>&1 | tee $HOME/timemachine-diff.log
This will compare the current folder (being the latest backup) with the root of your Mac. It shows the results on the screen, but also captures these in the file timemachine-diff.log
in your home folder.
The above will run a VERY long time (hours, maybe even days), so for testing you can first limit to a specific folder. Like for your desktop:
cd /Volumes/Backup*/Backups.backupdb/*/Latest/*/$HOME/Desktop
echo "Current folder on backup disk: $(pwd -P)"
sudo diff -qr . $HOME/Desktop 2>&1 | tee $HOME/timemachine-diff.log
If there's no output, then there are no differences. For testing just rename a file on your desktop, which should give you both "Only in ." for the original name (which is only on your backup) and "Only in /Users/username/Desktop" for the new name (which is not in the backup).
Notes:
When backing up over a network you'll probably use a sparse bundle. Just double-click that sparse bundle file to mount it before running the above commands. When done, right-click and Eject it.
Some files are excluded by design, some software may simply exclude itself, and FileVault folders are only written to a backup when you log out first. See Does Apple’s Time Machine app really copy everthing?
To see what has been written to the (latest) backup, see TimeTracker (GUI) or timedog (command line). Note that, even when running as an admin user, sometimes these programs need to be run as root to see all files. See How do I retrieve files from Time Machine backups from another computer? for help.
Log messages are not only written to Console (in Applications, Utilities; filter on backupd
, or use Time Machine Buddy), but different log messages are also kept in a hidden .Backup.log
file on the backup disk itself, within the folder with the backup date. See also What is Time Machine doing? at Server Fault.
Since 10.6.3 I noticed a "Verifying Backup..." stage in Time Machine, followed by "Preparing 51,959 Items...", prior to "Backing Up". Console mentions "Running backup verification", "QUICKCHECK ONLY; FILESYSTEM CLEAN" and "Backup verification passed!"
I have no idea what verification does. Maybe it's comparing the backup to the current disk contents: when I only have about 3.5 GB free disk space on my Mac, I noticed "CopyHFSMeta hit low disk space threshold", so apparently it's copying a lot of data back to my Mac? This is then followed by "Backup verification skipped during CopyHFSMeta", "Insufficient space on boot volume to complete backup verification" and a false "Backup verification skipped by user!" while I did not skip this myself. These messages are only found in the log; no indication to the user whatsoever, and the backup completes without any warning.
Apple offers a support article named About "Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you." In that article, the steps to manually verify the backup disk only check the physical condition of the disk image, and do not compare its contents to the disk of your Mac. So I guess that error is not about the backup contents either. Odd quote from that article:
Note: Do not repair the disk image with Disk Utility.
† Time Machine uses hard links, which makes each backup look like it holds all files. See a fine technical explanation at Ars Technica.
Related, in Ask Different: How should a user of OS X verify whether backed up data comprises everything required for lossless restoration?
– Graham Perrin – 2012-08-19T11:49:11.970