Add --extra-borg-options.list option #1164

Closed
opened 2025-10-19 15:01:38 +00:00 by courtney-rosenthal · 4 comments

What I'd like to do and why

I currently run borgmatic on multiple hosts. I have a utility that I can run that verifies the status of all those hosts.

To do this, it runs a command such as:

borgmatic list --json --config /usr/local/src/ansible-borgmatic/files/config.yaml:nas.chez-rufus.lan --match-archives '*'

The problem is that if there currently is a backup running on the host, it fails with an error:

Failed to create/acquire the lock /data1/home/fm2350/borg/nas.chez-rufus.lan/lock.exclusive (timeout).
ssh://fm2350@fm2350.rsync.net/./borg/nas.chez-rufus.lan: Error running actions for repository
ssh://fm2350@fm2350.rsync.net/./borg/nas.chez-rufus.lan: Command '('borg', 'list', '--remote-path', 'borg12', '--json', 'ssh://fm2350@fm2350.rsync.net/./borg/nas.chez-rufus.lan')' returned non-zero exit status 73.
/usr/local/src/ansible-borgmatic/files/config.yaml:nas.chez-rufus.lan: Error running configuration
/usr/local/src/ansible-borgmatic/files/config.yaml:nas.chez-rufus.lan: An error occurred

Since list is a read-only operation, the borg --bypass-lock option would be safe and I've verified it would do what I want.

I wish borgmatic had an option so I could run: borgmatic list --extra-borg-options.list --bypass-lock ...

Other notes / implementation ideas

No response

### What I'd like to do and why I currently run borgmatic on multiple hosts. I have a utility that I can run that verifies the status of all those hosts. To do this, it runs a command such as: ``` borgmatic list --json --config /usr/local/src/ansible-borgmatic/files/config.yaml:nas.chez-rufus.lan --match-archives '*' ``` The problem is that if there currently is a backup running on the host, it fails with an error: ``` Failed to create/acquire the lock /data1/home/fm2350/borg/nas.chez-rufus.lan/lock.exclusive (timeout). ssh://fm2350@fm2350.rsync.net/./borg/nas.chez-rufus.lan: Error running actions for repository ssh://fm2350@fm2350.rsync.net/./borg/nas.chez-rufus.lan: Command '('borg', 'list', '--remote-path', 'borg12', '--json', 'ssh://fm2350@fm2350.rsync.net/./borg/nas.chez-rufus.lan')' returned non-zero exit status 73. /usr/local/src/ansible-borgmatic/files/config.yaml:nas.chez-rufus.lan: Error running configuration /usr/local/src/ansible-borgmatic/files/config.yaml:nas.chez-rufus.lan: An error occurred ``` Since `list` is a read-only operation, the borg `--bypass-lock` option would be safe and I've verified it would do what I want. I wish borgmatic had an option so I could run: `borgmatic list --extra-borg-options.list --bypass-lock ...` ### Other notes / implementation ideas _No response_
Owner

Thanks for filing this! #427 already covers expanding extra_borg_options, but this ticket (#1164) is a good reminder that it should be implemented. So I'll close this one in favor of #427 and prioritize its implementation. Feel free to follow along there.

Thanks for filing this! #427 already covers expanding `extra_borg_options`, but this ticket (#1164) is a good reminder that it should be implemented. So I'll close this one in favor of #427 and prioritize its implementation. Feel free to follow along there.
witten 2025-10-22 19:21:12 +00:00

Thank you! Look forward to it.

Thank you! Look forward to it.
Owner

#427 is implemented in main and will be part of the next release! That means there's now a list option under extra_borg_options where you should be able to specify --bypass-lock or any other options you like.

#427 is implemented in main and will be part of the next release! That means there's now a `list` option under `extra_borg_options` where you should be able to specify `--bypass-lock` or any other options you like.
Owner

Released in borgmatic 2.0.10!

Released in borgmatic 2.0.10!
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#1164
No description provided.