Concurrent accesses to one repository

I’m trying to backup a directory on several servers into one repository, stored on S3, with restic version 0.8.3
The backup is launched on all servers at the same time. The backup fails for some servers (not for all) with the following errors:

Load(<lock/bb5b9cd5fd>, 0, 0) returned error, retrying after 8.46273541s: The specified key does not exist.
Load(<lock/bb5b9cd5fd>, 0, 0) returned error, retrying after 12.7255095s: The specified key does not exist.
Fatal: unable to create lock in backend: The specified key does not exist.

On each server, the backup is done with the command : restic backup $directory_to_backup --tag $tag

Does restic able to manage concurrent accesses (around 25 accesses) to one repository ?
Is there a limit of the number of concurrent access ?
Is it possible to check if there’s a lock on the repository before launching the backup ?
Is there an option to wait that there’s no lock on repository before the backup ?

Thanks in advance for your help

Hi @stephbat and welcome to the restic community :slight_smile:

restic does allow concurrent access for multiple backups to the same repository.
Some restic commands set an exclusive lock. You can read more about that here: References — restic 0.16.3 documentation
You won’t run into a restic internal issue with 25 writes to the repository.

Is it possible to check if there’s a lock on the repository before launching the backup ?

Yes see the restic help section for this.

Now, it would be really helpful to see the entire command you ran without any redactions - obviously we don’t want to see your password for the repo.

Also have you utilized the forum search before starting a new thread?
I did. Search results for 'The specified key does not exist' - restic forum.
And I came across this post here: Load snapshot: The specified key does not exist and FindLatestSnapshot error

Possibly there are other threads with people who ran into the same problem.
If you don’t find any solution to your issue, definitely come back here and share what you have learned so far.

Also, please make sure you try out a new version of restic. Yours is pretty old as the latest stable release is 0.11.1. So make sure you go to GitHub and get the latest release binary for your platform. :slight_smile:

Hi @moritzdietz
I will firstly install the latest version of restic, and I will retry …

Great! Let us know how it went :slight_smile:

I have retried with restic version 0.11.0, and I can now backup a directory on 21 servers into one repository at the same time.
I think that the behaviour is the same with the version 0.8.3, excepted that there are more retries on each server when there’s a bottleneck on repository. I still have the message “Load(<lock/feb46061a6>, 0, 0) returned error, retrying after 25.601948221s: The specified key does not exist.”