5

A Time-Machine tmutil compare with HFS backups (e.g. on High Sierra or Catalina) allows evaluating the differences between two backups by doing:

cd "${tmutil machinedirectory)"
tmutil compare 2022-01-23-170921 2022-19-064128

This fails on an APFS backup volume (e.g. on Monterey).

How do I compare two backups from an APFS-based Time Machine as is done with HFS+ Time Machine backups? Consider:

Output of tmutil listbackups

2022-01-19-111302.backup
2022-01-21-115629.backup
2022-01-23-080851.backup
2022-01-26-085332.backup

Output of tmutil machinedirectory

/Volumes/JRF_MBP_Backup

Output of ls -al /Volumes

drwxr-xr-x   3 root  wheel   96 Jan 26 09:23 .timemachine
drwxrwxr-x@  5 root  wheel  160 Jan 26 09:23 JRF_MBP_Backup
lrwxr-xr-x   1 root  wheel    1 Jan 23 07:26 Macintosh HD -> /

Unlike an HFS Time-Machine backup volume, no objects matching those of listbackups can be seen in the machinedirectory directory using simple ls command.

Output of ls -al /Volumes/JRF_MBP_Backup

drwx------  4 jrf   staff   128 Jan 19 08:30 .Spotlight-V100
drwxr-xr-x@ 5 root  wheel   160 Jan 26 08:53 2022-01-26-085332.previous
-rw-r--r--@ 1 root  wheel  1964 Jan 26 08:53 backup_manifest.plist

Instead, examining the /Volumes/.timemachine directory shows subordinate objects that correspond to listbackups.

Output of ls -al /Volumes/.timemachine/7DF818BF-10AE-48F6-B709-4EAB88C58D16

drwxrwxr-x@ 4 root  wheel  128 Jan 19 11:13 2022-01-19-111302.backup
drwxrwxr-x@ 5 root  wheel  160 Jan 21 11:56 2022-01-21-115629.backup
drwxrwxr-x@ 5 root  wheel  160 Jan 23 08:08 2022-01-23-080851.backup
drwxrwxr-x@ 5 root  wheel  160 Jan 26 08:53 2022-01-26-085332.backup

It seems reasonable, therefore, to do (for example):

cd /Volumes/.timemachine/7DF818BF-10AE-48F6-B709-4EAB88C58D16
tmutil compare 2022-01-23-080851.backup 2022-01-26-085332.backup

But, this fails:

Can't compare a source volume to a source volume.
Usage: tmutil compare [-@acdefghlmnstuEX] [-D depth] [-I name]
       tmutil compare [-@acdefghlmnstuEX] [-D depth] [-I name] snapshot_path
       tmutil compare [-@acdefghlmnstuEUX] [-D depth] [-I name] path1 path2

How do I compare two backups from an APFS-based Time Machine as is done with a HFS+ Time Machine backups?

1 Answer 1

7

I figured out what I was doing wrong.

From the tmutil manpages:

volume store

A directory inside a backup that represents a single initial or incremental backup of one backup source. E.g.,

/Volumes/Chronoton/Backups.backupdb/thermopylae/2011-07-03-123456/MacHD

/Volumes/.timemachine/*/2011-07-03-123456.backup/2011-07-03-123456.backup/MacHD

APFS backups are the second format, where * is the UUID directory node subordinate to /Volumes/.timemachine. Thus, in the environment shown, instead of:

cd /Volumes/.timemachine/7DF818BF-10AE-48F6-B709-4EAB88C58D16
tmutil compare 2022-01-23-080851.backup \
               2022-01-26-085332.backup

One must do:

cd /Volumes/.timemachine/7DF818BF-10AE-48F6-B709-4EAB88C58D16
tmutil compare 2022-01-23-080851.backup/2022-01-23-080851.backup \
               2022-01-26-085332.backup/2022-01-26-085332.backup

This works correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .