problem with restic and openstack

Hello
I use restic with openStack. My daily backups had been working fine for a week and now impossible to make a backup and more worryingly I can no longer read my old backups. whatever command I execute I get the following error message :

Load(<lock/b5fde0b117>, 0, 0) returned error, retrying after 15.653859997s: conn.ObjectOpen: Object Not Found
Fatal: unable to create lock in backend: conn.ObjectOpen: Object Not Found

I tried “unlock” and “check” but always the same error message.
By re-creating a repository the backups work.
Do you have any idea where this problem might be coming from. Because I can no longer read my old backups
Thanks in advance for your help
Eric

restic 0.8.3
compiled with go1.10 on linux/amd64

Hm, did you do anything, like upgrade restic or so when it started failing?

This is an issue with a lock file that looks like it’s “stuck” in the repo, so you can check the following:

  • Is it always the same ID (here, the string b5fde0b117) or does the ID vary?
  • Does the file restic tries to load exist in the locks/ directory on the server?

You can always access your backups in a read-only way by using the --read-only option, this works for the snapshots and restore commands, but may not work for the mount command. Please only use those sparingly, when other clients run forget or prune on the repo at the same time it may get corrupted.

Do you mean we should only use snapshots and restore with --read-only sparingly, because using them can corrupt the repo?

Thank you for that quick answer. Here are the answers to the questions:

No, I haven’t updated. I directly installed restic 0.8.3
the ID varies ( not often), it is not always the same number.
I don’t see the lock directory on the server because it’s an OVH cloud storage offer.

I’ve tried the --read-only option, it doesn’t work but I’m not sure I’m using the option properly

restic -r swift:CirqueAutourFs1SambaBackup:/ snapshots -o --read-only

enter password for repository:
password is correct
Load(<lock/43acd95c74>, 0, 0) returned error, retrying after 300.540301ms: conn.ObjectOpen: Object Not Found
Load(<lock/43acd95c74>, 0, 0) returned error, retrying after 514.220755ms: conn.ObjectOpen: Object Not Found
...: 
Fatal: unable to create lock in backend: conn.ObjectOpen: Object Not Found

However this works with the no-lock option but there are error messages and the ID changes

restic --no-lock  -r swift:CirqueAutourFs1SambaBackup:/ snapshots

enter password for repository:
password is correct
Load(<snapshot/ce4f2bebc7>, 0, 0) returned error, retrying after 466.444557ms: conn.ObjectOpen: Object Not Found
Load(<snapshot/ce4f2bebc7>, 0, 0) returned error, retrying after 1.102266463s: conn.ObjectOpen: Object Not Found
...
could not load snapshot ce4f2beb: conn.ObjectOpen: Object Not Found
ID        Date                 Host        Tags        Directory
8e92678d  2018-03-28 19:19:38  vps499348               /data/sambashare/Cirque-Autour
4a00d489  2018-03-29 11:04:27  vps499348               /data/sambashare/Cirque-Autour

Eric

Might be caused by some OVH unreliability. See issue #1688.

I advise to not use --no-lock at all when there’s even a tiny chance that a different restic process may run forget or prune at the same time. This second process won’t know that there’s a restic process which actively uses the data stored in the repo (or adds new snapshots which adds references to data in the repo), so the second restic process may decide to delete data that is (apparently) not needed any more. The result is a repo which does not have all the data needed for restore.

While this situation will only occur in rare cases, the lock files are there for a reason. And if you disable them, well, then you’re on your own :wink:

If there is no other process accessing the repo at the same time, it’s fine to use restic with --no-lock. Originally we added it to support restores from a repo on a read-only medium (think DVD or broken harddisk).

1 Like

Hm, it looks like it’s an issue with the Swift backend and OVH. You need to pass --read-only without the leading -o.

I’ll try to find some time to reproduce it, we can probably work around it using a fix similar to the one I applied for the local and sftp backends:

Ah good, thanks for the clarification!

thank you very much for taking the problem into account