I have a restic backup that runs from a server to an S3 compatible storage provider (Dreamhost Dream Objects), which I then restore from onto another machine (my home NAS), to give me two full backups.
So the setup is:
Backup Source -> Dream Objects Bucket (repository) -> Home NAS
It’s working fine, except that every time the restore command runs I get tens of thousands of “restored” items listed in the results, even though significantly fewer than that have actually changed. This is despite having --overwrite=if-changed set.
By upping the verbosity with -vv I can see a long list of “restored” items that are just directories, but nothing about them has changed — not the modification time, not their contents, not any extended attributes etc. so I’m unsure why restic is insisting on “restoring” them every time, rather than detecting that they are unchanged and skipping them like it does for unchanged files.
Backup Command: restic backup --no-scan --quiet --skip-if-unchanged --exclude-caches /path/to/backup/source
Backup Variables (From Environment, value omitted): RESTIC_REPOSITORY, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, RESTIC_PASSWORD
Restore Command: restic restore --sparse --overwrite=if-changed --delete --exclude=.non.existent.file --target=/path/to/restore/target
Restore Command (From Environment): (as per backup variables)
I added --exclude=.non.existent.file to the restore command because it seems to be a requirement for --delete to have at least one include or exclude option but I want everything to be synchronised exactly between the remote machine’s source folder and my NAS’ target folder.
Version: restic 0.19.1 compiled with go1.26.5 on darwin/amd64
It’s a pretty minor issue, as the actual quantity of data reported as being restored seems about right (the same as the backup step) and I’m not sure much transfer activity during the directory “restores” I’m just wondering why the command is wasting so much time “restoring” things that haven’t changed despite me asking it not to, and taking longer as a result.
Is it just a current issue with directories, or is there something I can change to reduce the thousands of false positive restores?