Recover a deleted snaphot

Hi,

I’m trying to recover a snapshot deleted by forget. I typed the command:

restic -r d:\copias forget 93c08ac7

After running this command the snapshot is deleted. But when I tried to recover it, I couldn’t do it. To recover the snapshot I typed the command:

restic -r d:\copias recover

The result of running the command is this one:

enter password for repository:
repository d87b845a opened (version 2, compression level auto)
load index files
[0:00] 100.00%  3 / 3 index files loaded
load 169 trees
[0:00] 100.00%  169 / 169 trees loaded
load snapshots
done

found 0 unreferenced roots
no snapshot to write.

After running it I couldn’t display the new snapshot.
I don’t know what’s wrong. I’m using version 0.17.3 of restic running Windows 11.

Thanks

Note that the recover command does not recover snapshots, but (tries to) recover unreferenced data. If it finds some trees which are not referenced by any snapshot, it creates a new snapshot which points to such a tree.

So, in your case, the snapshot you have removed by forget seems to point to a tree which is already referenced in another, still existing snapshot. Most likely this is because the snapshots tree was identical to a previous or follow-up snapshot.

1 Like