Speedup Restic Backups After A Drive Replacement
I recently had to upgrade an external hard drive to a higher capacity. I used rsync
in the
archive mode to ensure to preserve all the necessary meta data. One of the main reasons for this was
to avoid having to re-read the whole drive in backup programs (due to changed timestamp). In the case
of restic though it was scanning all the files nonetheless.
After some digging and I figure out the issue. Restic along with a meta data changes also checks whether
the inode
of the file has changed. While rsync can preserve many
things inodes is not one of the because they automatically assigned. This means the files on the new
drive have been identical to the original in all but their inodes. Fortunately restic has an option
to skip the inode check which is aptly named --ignore-inode
. Using that argument restic was flying
though the already backed up fils in no time.