Safe to manage repos with multiple restic instances (restic-server and Backrest)?

It is absolutely safe, but operations that need an exclusive lock on the repository (mainly operations that remove or alter things) can only run one at a time. For example, you can have multiple backups running simultaneously to a single repository, but only a single prune operation. Other operations that try to start while the prune operation is running will fail with errors stating they could not lock the repository.

For your proposed use case, so long as you can schedule the jobs so they don’t overlap with one another (or the scheduling is robust enough to “try again later” in the event of the repository being locked) you should not have any issues. Regardless, even if the jobs do overlap, it is “safe” in that they will fail safely, and not introduce data corruption.

FYI, here’s a non-exhaustive list of what kinds of lock each operation needs: List of lock rules in documentation - Getting Help - restic forum

1 Like