Snapshot exists, but does not show in snapshots command

Hi, If I run the snapshots command, I get a few old snapshots (from when I ran the first time the backup command), and some recover snapshots that I created with the recover command. But it does not show the recent snapshots created using the backup command.

Just now I made a new snapshot using the backup command:



############################
user@ubuntu_nas:~$ restic -r b2:[Repository] backup [/Path]
repository f09d2171 opened successfully, password is correct

Files: 0 new, 0 changed, 1941 unmodified
Dirs: 0 new, 7 changed, 0 unmodified
Added to the repo: 2.574 KiB

processed 1941 files, 1016.828 MiB in 0:03
snapshot 7300d518 saved

user@ubuntu_nas:~$ restic -r b2:[Repository] snapshots
repository 9c8d785f opened successfully, password is correct
ID Time Host Tags Paths


9103d720 2019-09-25 13:17:51 ubuntu_nas /mnt/###/data
06bd32d5 2019-09-25 13:21:06 ubuntu_nas /mnt/###/data
3616388e 2019-09-25 13:39:52 ubuntu_nas /mnt/###/data
6db00072 2019-09-25 13:49:45 ubuntu_nas /mnt/###/data
174a8367 2019-09-25 13:52:51 ubuntu_nas /mnt/###/data
47240225 2019-09-25 13:55:27 ubuntu_nas /mnt/###/data
d52afe82 2019-09-25 13:56:14 ubuntu_nas /mnt/###/data
b6de7898 2019-09-25 14:13:26 ubuntu_nas /mnt/###/data
8cf3b73e 2020-08-18 08:17:13 ubuntu_nas /recover
227321cf 2020-09-24 11:20:29 ubuntu_nas /recover


10 snapshots

############################

Why is the latest snapshot (7300d518) not showing here? And all the other backup snapshots made once a night? I can see in Backblaze portal that the backup command runs every night, as I also just did manually.

Which restic version are you using?

Very interesting. At first one might think that it’s just B2 being eventually consistent, but if it’s been days since you took some snapshots where you know restic said “snapshot saved” and they still don’t appear, that’s fishy.

I don’t suppose there’s the concept of a filesystem with directories in your B2 bucket? If there was, I would suggest that you use some file browser for it to check in the snapshots directory if there are any files there for the snapshots you’re missing.

Running Ubuntu Server and

restic 0.9.6 compiled with go1.13.4 on linux/amd64

The B2 bucket does not show the restic snapshots, it is a restic thing… There are (encrypted) file blocks in B2, and I can see that files that were changed on the server resulted in a new uploaded file block to B2

Are you aware that repository ID’s are different in both commands? You might be getting backup to some other endpoint.

I am sorry, but I don’t follow… (So I guess I am not aware… :frowning: )

When you do an operation on a restic repo, restic first “opens” (a.k.a. unlocks) that repo and reports it.

Your snapshot-taking command has:

 repository f09d2171 opened successfully, password is correct

And your snapshot-listing command has:

 repository 9c8d785f opened successfully, password is correct

Which indicates this is not the same repo, since their IDs are different. :slightly_smiling_face:

Aha… I will run these commands again and see what happens…

Thnx!

I feel SO STUPID!!!

I run restic cron jobs backing up different folders on the server to different folders in the B2 Bucket. And I looked for snapshots of the main bucket, not the bucket folders that I backup to every night.

If I run:

restic -r b2:bucket_name:/folder_name snapshots

(Instead of restic -r b2:bucket_name snapshots)

I get a list with all the snapshots.

THNX! You saved me!

1 Like

Np, glad to hear snapshots were not lost.
I also spent some time panicking “oh shoot did I prune these production snapshots” then realizing my environment variables are set for a different repo :slightly_smiling_face:

Well done @gurkan for spotting such an obvious mistake.

1 Like

@rveffer You should probably upgrade to the recently releases restic 0.10.0 as it contains a lot of improvements :slight_smile:

Yes, I should. But I installed restic via Snap, and this is apparently the latest version on Snap…

I will give Dustin Krysak (bashfulrobot) a bit more time to update the Snap package… :wink:

Sure thing. Meanwhile you can always just grab the restic 0.10.0 binary and run that, since it’s really just one single binary that doesn’t need to be installed or anything, just run it. We won’t tell Dustin, promise!