backups: only run restic prune on the last backup #323

Merged
teutat3s merged 1 commit from backups-prune-only-once into main 2025-04-02 11:51:06 +00:00
Owner

After this change, only obs-portal backup will prune the repository of
old snapshots. This is the last backup service to run at 06:00 AM UTC.

This should avoid our nightly backups failing because of the exclusive
lock on the restic repo. We currently start the next backup while the
previous one is still pruning, which makes the newly started one fail
with:

repo already locked, waiting up to 0s for the lock
unable to create lock in backend: repository is already locked by PID 228…
After this change, only `obs-portal` backup will prune the repository of old snapshots. This is the last backup service to run at 06:00 AM UTC. This should avoid our nightly backups failing because of the exclusive lock on the restic repo. We currently start the next backup while the previous one is still pruning, which makes the newly started one fail with: ``` repo already locked, waiting up to 0s for the lock unable to create lock in backend: repository is already locked by PID 228… ```
teutat3s added 1 commit 2025-04-02 11:22:32 +00:00
After this change, only obs-portal backup will prune the repository of
old snapshots. This is the last backup service to run at 06:00 AM UTC.

This should avoid our nightly backups failing because of the exclusive
lock on the restic repo. We currently start the next backup while the
previous one is still pruning, which makes the newly started one fail
with:

repo already locked, waiting up to 0s for the lock
unable to create lock in backend: repository is already locked by PID 228…
requested reviews from b12f, hensoko, axeman 2025-04-02 11:22:39 +00:00
b12f approved these changes 2025-04-02 11:29:44 +00:00
hensoko approved these changes 2025-04-02 11:32:00 +00:00
teutat3s merged commit 8474bd6411 into main 2025-04-02 11:51:06 +00:00
teutat3s deleted branch backups-prune-only-once 2025-04-02 11:51:06 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: pub-solar/infra#323
No description provided.