For the last years I used a simple but quite efficent way of backup: I did
rsync --inplace for my NAS data and after rsync did its job I took a btrfs snapshot of the current state. That way I got deduplication (as long as the path of files did not change) and even compression (which restic doen’t have yet). But this backup method has one flaw: when I shuffle around files on my NAS they would end duplicated in my backup and that prevented me to clean up my NAS for a long time
So, I found restic and it looks like the perfect solution for me. First made an initial backup with restic as an test and then a second to see how long it takes.
rsync took about 30 minutes,
restic more than one hour. I didn’t investigate that but as it is at least bearable, so I decided to go with
Therefore I want to migrate my existing btrfs snapshots to restic. That’s what I do (per script): I bindmount the snapshot to the original mountpoint of my NAS and let
restic do its backup magic.
But on every run, restic will re-read all files and that takes ages:
snapshot 624f84bb saved open repository repository 82b9ca20 opened successfully, password is correct Files: 135140 new, 145345 changed, 0 unmodified Dirs: 0 new, 1 changed, 0 unmodified Added to the repo: 5.589 MiB processed 280485 files, 1.377 TiB in 5:57:25
I checked the metadata like timestamps and inodes, but can’t see a difference in files on different btrfs snapshots. To shorten the time I already removed a number of old snapshots and kept only one per month, but it will still take weeks to migrate the old backup to restic.
What can I do to prevent
restic from re-reading unmodified files?