Question about tree blobs

I do a nightly backup of the music on my NAS. Most of the time, nothing changes and a backup looks like this:

using parent snapshot 10a72eb3

Files:           0 new,     0 changed, 32782 unmodified
Dirs:            0 new,     3 changed,  2613 unmodified
Added to the repository: 1.541 KiB (1.042 KiB stored)

processed 32782 files, 520.483 GiB in 0:14
snapshot db5ec6c6 saved

So 3 directories changed. I wanted to figure out what actually, so I did a diff between the 2 snapshots:

comparing snapshot 10a72eb3 to db5ec6c6:


Files:           0 new,     0 removed,     0 changed
Dirs:            0 new,     0 removed
Others:          0 new,     0 removed
Data Blobs:      0 new,     0 removed
Tree Blobs:      3 new,     3 removed
  Added:   1.541 KiB
  Removed: 1.541 KiB

According to this, no directories were changed, only tree blobs. How do I find out what really changed?

Edit:

I ran the diff again, this time with --metadata. It showed that the 3 directories leading up to the music directory changed:

/home/
/home/fortemezzo/
/home/fortemezzo/data/

But since I’m not backing up those directories (the directory I’m backing up is /home/fortemezzo/data/music/), shouldn’t changes in those directories be ignored?

The leading directories (/home etc) up to the actual backup targets are included in a backup to preserve the file structure. To include proper metadata, restic uses the metadata from the actual folders, which can change. You could use relative paths to create the backup, in which case the leading folders won’t be included in the actual snapshot.

1 Like