borg-backup-ui icon indicating copy to clipboard operation
borg-backup-ui copied to clipboard

Respect repository locks during restore operations

Open borg-codex-bot opened this issue 4 months ago • 0 comments

Problem

Backup jobs acquire resource locks for their repository, but Browse & Restore does not currently participate in the same application-level lock model. A restore extraction can therefore run while a backup job for the same repository starts, or restore browse/precheck operations can surface low-level Borg lock errors while a backup is active.

Goal

Make restore operations respect active repository resource locks in a predictable way:

  • Browse/list/precheck should not acquire long-lived locks, but they should detect an active repository lock for the selected job and return a clear user-facing conflict instead of invoking Borg blindly.
  • Restore extraction should acquire the same repository resource lock as backup jobs for the duration of the restore.
  • Backup jobs, repository maintenance, and restore extraction should not run concurrently against the same repository.
  • Locks must recover stale holders using the existing resource-lock behavior.

User impact

Users get clear feedback when a repository is busy, and the UI avoids unsafe or confusing concurrent backup/restore activity on the same Borg repository.

borg-codex-bot avatar Aug 01 '26 06:08 borg-codex-bot