Speed Up Restic Backups After a Drive Replacement

22 January 2022 · 1 min read · restic, command line, backup

Contents

I recently had to replace an external hard drive with a higher-capacity one. I used rsync in archive mode to preserve all metadata and avoid forcing backup programs to re-read the entire drive. Restic, however, was scanning all files regardless.

After some digging I found the cause. Restic checks both metadata and the inode of each file. While rsync can preserve many things, inodes are not one of them — they are assigned automatically by the filesystem. So every file on the new drive was identical to the original in all respects except its inode, causing Restic to treat them all as changed.

Fortunately Restic has an option to skip the inode check: --ignore-inode. With that flag Restic flew through the already-backed-up files in no time.