The problem is that restic simply doesn’t know whether the files have been changed if it doesn’t have some reference to compare them to.
If you back up the same path set twice, restic finds a prior snapshot and can use the metadata (mtime, size, permissions, etc.) to determine if a file has changed. If the metadata hasn’t changed then restic assumes that the file’s contents are unchanged without even looking at them. This is the fast path.
If there is no parent snapshot, restic doesn’t have a set of metadata to look at and must chunk every file and hash every chunk, and at the end of that process it finds that the chunks already exist and so are deduplicated. This is the slow path.
How would you expect restic to locate a suitable set of metadata for the files you’re backing up if the particular path you’re backing up doesn’t appear anywhere in the repository? Basically, restic can’t magically determine that information and it’s a bit unrealistic to expect it to do so.
--parent, which you can use to force a specific parent snapshot, but if the paths don’t match then it’s not useful. Restic simply doesn’t know that the two different paths contain mostly the same files.
What could make sense is some manual option that says “path
x previously appeared as path
y, so use
y as the prior directory for the purposes of a metadata check.” However, this is such a niche case that it may not be very widely useful.
Consider instead using something like
--group-by host,tags when running
restic forget and make sure you tag each snapshot with the year (
--tag pictures-2019 for example). Note that the default option is
--group-by host,paths (which is why using different paths solves this problem) so make sure that
host,tags won’t mess up any of your other use cases.