Support break-lock? #357

Closed
opened 2020-08-26 19:00:55 +00:00 by harriv · 5 comments

What I'm trying to do and why

I'm backing up over SSH (very long backup). If the backup interrupts (connection broken, computer turned off) mid-backup, continuing backup seems to require "borg break-lock" command. It would be nice if borgmatic either automatically handles this situation, or supports the command so I don't have to manually re-enter the repository path and credentials..

#### What I'm trying to do and why I'm backing up over SSH (very long backup). If the backup interrupts (connection broken, computer turned off) mid-backup, continuing backup seems to require "borg break-lock" command. It would be nice if borgmatic either automatically handles this situation, or supports the command so I don't have to manually re-enter the repository path and credentials..
Owner

A borgmatic break-lock action that wraps Borg's own break-lock sounds handy, and makes sense to me. And it appears that break-lock succeeds silently if there's no lock in place. So it should be totally fine for borgmatic to loop over all configured repositories, breaking each one's lock in turn.

Thank you for filing this idea!

A `borgmatic break-lock` action that wraps Borg's own `break-lock` sounds handy, and makes sense to me. And it appears that `break-lock` succeeds silently if there's no lock in place. So it should be totally fine for borgmatic to loop over all configured repositories, breaking each one's lock in turn. Thank you for filing this idea!
Author

I'm not so much into borg internals, but the documentation asks to be careful so I'm not sure how safe this is to do automaticalla: https://borgbackup.readthedocs.io/en/stable/usage/lock.html#borg-break-lock

I'm not so much into borg internals, but the documentation asks to be careful so I'm not sure how safe this is to do automaticalla: https://borgbackup.readthedocs.io/en/stable/usage/lock.html#borg-break-lock
Owner

Yeah, you shouldn't run break-lock if the lock is legitimately there because Borg is running! For that reason, I could see making borgmatic break-lock take an optional --repository parameter.

Yeah, you shouldn't run `break-lock` if the lock is legitimately there because Borg is running! For that reason, I could see making `borgmatic break-lock` take an optional `--repository` parameter.
Owner

A little late, but this is implemented now in master! Should be part of the next release.

A little late, but this is implemented now in master! Should be part of the next release.
Owner

Just released in borgmatic 1.7.3!

Just released in borgmatic 1.7.3!
Sign in to join this conversation.
No Milestone
No Assignees
2 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: borgmatic-collective/borgmatic#357
No description provided.