Prevent prune collisions by assigning one maintenance owner per repository and giving it a window in which no backup client can start new work.
On a shared home-server repository, the failure usually begins earlier than the lock error: several hosts own maintenance schedules, one backup runs longer than expected, and prune starts without a repository-wide gate. Reverse that timeline. Centralize prune, reserve enough time, serialize jobs outside Restic, and alert on skipped or overdue runs. If a collision already exists, stop new jobs and use the minimal recovery path rather than weakening locking.
Give Each Repository One Maintenance Owner
Search every client and repository-side service for Restic maintenance commands. Record who owns forget, prune, check, unlock, and alerts. Disable duplicate prune schedules and keep one controller with the repository credentials and visibility needed to see all clients.
Multiple backups can be coordinated around one repository, but removing every lock before prune defeats the safety boundary and can create the unsafe overlap the schedule was meant to avoid.
The ownership check passes when only one host can start repository-wide maintenance and every backup client knows where failures are reported. If an appliance or backup wrapper can launch hidden maintenance, disable its automatic option or include it in the same controller before proceeding.
Reserve a Prune Window Longer Than the Worst Normal Run
Use recent logs to find the longest normal backup, the longest recent prune, client wake delays, and retry backlog. Place prune after the latest expected backup completion and leave time for its own worst normal duration. Do not choose midnight merely because it looks quiet on one host.
A retention plan should also scope snapshots by host or tag so multi-host retention does not select the wrong snapshots while the repository is under one maintenance owner.
If backups frequently cross the proposed boundary, move prune rather than shortening the backup window. If prune duration grows beyond the available gap, reduce how often physical reclamation runs, investigate backend throughput, or use a larger window. Prevention fails when the schedule depends on every job finishing at its average time.
Enforce Mutual Exclusion and a Visible Retry Policy
Use one external serialization method that every local job respects: systemd unit ordering, a shared lock wrapper, or a queue controlled by the maintenance host. The wrapper should refuse or delay the later job, preserve Restic's own locking, and write a clear status that monitoring can alert on.
A systemd-based Restic schedule can separate recurring backup and pruning services so ordering, exit status, and logs remain visible.
Set a bounded retry interval and a maximum delay. A backup blocked by maintenance should retry after the window, not vanish until tomorrow; a prune blocked by a late backup should alert and move to the next approved window. Never make automatic forced unlock the retry action.
Test the Prevention Policy and Keep a Minimal Rollback
Test both orders on a disposable repository or sample dataset: start backup first and request prune, then start prune first and request backup. In each case, one job should wait or exit visibly, the controller should retry under the configured policy, and no lock should be removed underneath an active process.
After deployment, inspect the next normal backup, forget, and prune logs. If the repository acts read-only after maintenance, use the separate interrupted-prune recovery path rather than loosening the prevention gate.
The policy passes when two cycles complete without overlap, delayed jobs retry visibly, alerts fire for missed windows, and a sample restore remains valid. If it fails, disable prune automation first and keep ordinary backups running with normal locking. Escalate when no maintenance window fits the measured workload or the backend cannot complete prune reliably.
Support & Tips
More to Read

How to Schedule Restic Backup, Forget, and Prune Jobs Without Lock Conflicts
A complete multi-host Restic schedule that separates frequent backups, scoped retention, physical prune, checks, retries, and restore validation.

How to Clear a Stale Restic Lock Without Interrupting an Active Backup
A least-invasive Restic unlock workflow that protects active backups, removes only stale state, and confirms recovery under the normal schedule.

Why Does a Restic Backup Stall When Another Host Starts Pruning?
A focused diagnosis of Restic prune lock contention, including lock-owner checks, safe recovery, trigger-state retesting, and stop conditions.

