Backfilling snapshots from non-restic archives

It can impact the speed; if restic can locate a prior “parent snapshot” then it looks at file metadata (size, mtime) to decide if it needs to inspect the file contents for changes. If there is no parent snapshot, restic must chunk and hash each chunk to determine if the data changed. This is CPU-inefficient on the client, but does not change the amount of new data in the repository.

I have a similar problem: my backup scripts use LVM snapshots to create atomic backups, which is important for e.g. database servers, but I don’t want the backups to include the LVM snapshot mountpoint path. To get around this, I simply chroot into the snapshot path and run restic from inside the chroot.

You could do something similar, and create a minimal chroot (using e.g. debootstrap if on Debian) and then you can extract those backups to /path/to/chroot/home/chris and backup from inside the chroot.

See also: Backup option to remove a leading path prefix · Issue #2092 · restic/restic · GitHub

1 Like