Backups that failed overnight with "repository is already locked by PID N" - retention pruning and integrity checks - are fixed at the root, and a hung restic no longer needs a container restart to clear the lock.
Fixed
- "Repository is already locked" no longer fails retention, verify or backup (#91, #92, #94, #96, #97). The real cause was a live restic process holding the repo lock, not a stale leftover - so the previous automatic force-unlock could never clear it, and was unsafe (it could strip the lock off a running operation). The collision is now removed at the source:
- Read-only operations (
stats,diff) run lock-free, so they can never block a retention prune or a backup. This was the overnight "prune failed for every container" storm. - Lock-taking operations now wait out a brief competing lock (up to 5 minutes) instead of failing instantly - covering a second BombVault instance, a lingering old container after an update, or two operations meeting on the same repo.
- Tagging a snapshot now runs under the same per-repo serialization as every other write.
- Read-only operations (
- A hung restic no longer needs a container restart (#92, #97). If restic (or its rclone helper) wedged, it kept refreshing its lock and only a container restart could clear it. restic now runs in its own process group and is force-killed as a whole on cancel/timeout, so a hung run is reaped and its lock becomes clearable. (A process stuck on a truly dead network mount still cannot be killed by any signal - that is a mount-health problem, not a lock problem.)
- The unsafe automatic force-unlock is gone. It could not fix a live lock and endangered a running operation. A genuine stale orphan (a crashed run's dead lock) is still cleared automatically, and the manual Unlock button is unchanged.
Changed
- The container hostname is pinned to
bombvaultfor stable restic locks. restic stamps its repo locks with the container hostname, which used to be a random ID that changed on every container recreate - so a genuine orphan lock left by a crash-during-update was not recognized as stale for up to 30 minutes. A stable hostname lets restic clear such an orphan within seconds. Self-detection ("never back up myself") uses theBOMBVAULT_SELF_CONTAINERvariable (defaultBombVault) and is unaffected. New installs get this automatically; existing installs can add--hostname=bombvaultto the container's Extra Parameters. Only if you deliberately clearBOMBVAULT_SELF_CONTAINERor run with host networking, set it to your exact container name.
Docs
- The VM-backup SSH setup guide now uses a graceful
killall -HUP sshdreload in the/boot/config/gosnippet instead ofrc.sshd restart, which avoids the harmless but alarming "Restarting SSH server daemon" warning at boot.