I am trying to modernize an existing restic repository using restic 0.14.0. Initial checks report a missing data file, and then an error in one specific tree:
% restic migrate upgrade_repo_v2
repository 6f6b6180 opened (repository version 1) successfully, password is correct
checking repository integrity...
using temporary cache in /tmp/restic-check-cache-2941017919
repository 6f6b6180 opened (repository version 1) successfully, password is correct
created new cache in /tmp/restic-check-cache-2941017919
load indexes
check all packs
pack a6e17d0139b44785e403f2ca8b5bcf56067d6ec6f073c2e3a44dfeb19775a566: not referenced in any index
pack 58e7e5f3d3e43c3e5fde12cde1d7a9b0a24311f09f7a01c2aac4762226e39811: not referenced in any index
pack 4b78c6e99fbcbf7e1389f3e6eb226e6ffe30ae25e1196ef2dd4b24abb70bb927: not referenced in any index
3 additional files were found in the repo, which likely contain duplicate data.
This is non-critical, you can run `restic prune` to correct this.
check snapshots, trees and blobs
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 582.280027ms: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 703.28564ms: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 1.040217184s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 2.002763936s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 1.431768704s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 2.492721545s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 3.399927963s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 6.842164996s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 13.00939464s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 0, 0) returned error, retrying after 25.250366555s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 357.131936ms: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 660.492892ms: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 920.315446ms: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 1.635001613s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 1.982055195s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 3.011308614s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 6.715255694s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 6.138576273s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 9.010955269s: <data/81cb27601a> does not exist
Load(<data/81cb27601a>, 927, 711649) returned error, retrying after 16.547394626s: <data/81cb27601a> does not exist
error for tree cb5e822d:snapshots
ReadFull(<data/81cb27601a>): <data/81cb27601a> does not exist
[19:51] 100.00% 78 / 78 snapshots
My usual scorched-earth recovery strategy would be to restic forget
all snapshots that contain the defective tree. However, no snapshot seems to contain this tree:
% restic find --tree cb5e822d
repository 6f6b6180 opened (repository version 1) successfully, password is correct
# Executes for 8 minutes, but produces no other output.
How can I get my repository back to a valid state? Forgetting entire snapshots is fine with me, if that’s the easiest way to get there. But I’d rather not throw away the entire repository, if something less extreme will work.