Long backup after change of paths (mountpoint)

I changed the mount point of a drive I backup with restic. Now all paths have changed. I suppose that is the reason for the command line message no parent snapshot found, will read all files. However, reading all files again takes hours even though nothing has changed. Can I tell restic somehow: all files that were called /some/mountpoint/my/files before are now called /mnt/new/my/files and speed things up?

Specifying the parent snapshot manually should help. You’ll need to use the --parent flag with your restic backup command.


From the manual, I would not have guessed that this --parent option is related to my issue. And actually, it does not change the backup duration, it still takes hours like for a 1st-time backup.

The option, I would think of is --moved-root /some/mountpoint /mnt/new which probably just doesn’t exist.

In the end, it took 2:19:23. All files and folders were recognized as “new”. Restic added only 1.5 GB as new data while processing 433 GB. So while the identical content was recognized, restic had to read it. Without the change in the file paths, the backup would have been much faster.

Files:       95132 new,     0 changed,     0 unmodified
Dirs:         1211 new,     0 changed,     0 unmodified
Added to the repository: 1.504 GiB (1.495 GiB stored)

processed 95132 files, 433.011 GiB in 2:19:23

Note that the --parent option does NOT help you if you changed your path-to-backup! A parent only speeds up the backup for all files which exist in the parent with identical path.

In your case, restic would use that parent, but look for a path /mnt/ in it - just to see this path doesn’t exist and then process like it doesn’t have a parent at all.

Thanks, @alexweiss for the clarification. That’s what I assumed. In my case, I just waited for one night to process everything.

In general, this might be a feature request to add a method to move files inside the repository in a way that restic knows that these files have a new name without actually processing them (a bit like a git mv – not knowing what that does internally in git).

Git deletes the files at the old location and adds them at the new location, but git does not store the information that the file was actually moved. The move detection happens later on.