Unable to export key with native "borgmatic borg ..." command #515

Closed
opened 5 months ago by persal · 2 comments

What I'm trying to do and why

Export encryption repokey

Steps to reproduce (if a bug)

borgmatic borg key export

Actual behavior (if a bug)

Prints error message:

borgmatic borg key export
someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg: Running arbitrary Borg command
usage: borg key [-h] [--critical] [--error] [--warning] [--info] [--debug]
                [--debug-topic TOPIC] [-p] [--iec] [--log-json]
someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg: Error running actions for repository
Command 'borg key someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg export' returned non-zero exit status 2.
/etc/borgmatic.d/somename.borg.yml: Error running configuration file

summary:
/etc/borgmatic.d/somerepo.borg.yml: Error running configuration file
someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg: Error running actions for repository
usage: borg key [-h] [--critical] [--error] [--warning] [--info] [--debug]
                [--debug-topic TOPIC] [-p] [--iec] [--log-json]
Command 'borg key someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg export' returned non-zero exit status 2.

Need some help? https://torsion.org/borgmatic/#issues

Expected behavior (if a bug)

Show exported key.

Other notes / implementation ideas

Environment

borgmatic version: 1.5.24

borgmatic installation method: Custom pyinstaller for Debian 11, installed with ansible.

Borg version: 1.2.0

Python version: 3.9.2

operating system and version: Debian 11/bullseye

#### What I'm trying to do and why Export encryption repokey #### Steps to reproduce (if a bug) borgmatic borg key export #### Actual behavior (if a bug) Prints error message: ``` borgmatic borg key export someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg: Running arbitrary Borg command usage: borg key [-h] [--critical] [--error] [--warning] [--info] [--debug] [--debug-topic TOPIC] [-p] [--iec] [--log-json] someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg: Error running actions for repository Command 'borg key someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg export' returned non-zero exit status 2. /etc/borgmatic.d/somename.borg.yml: Error running configuration file summary: /etc/borgmatic.d/somerepo.borg.yml: Error running configuration file someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg: Error running actions for repository usage: borg key [-h] [--critical] [--error] [--warning] [--info] [--debug] [--debug-topic TOPIC] [-p] [--iec] [--log-json] Command 'borg key someuser@1.2.3.4:/backup/someuser/somehost/somerepo.borg export' returned non-zero exit status 2. Need some help? https://torsion.org/borgmatic/#issues ``` #### Expected behavior (if a bug) Show exported key. #### Other notes / implementation ideas #### Environment **borgmatic version:** 1.5.24 **borgmatic installation method:** Custom pyinstaller for Debian 11, installed with ansible. **Borg version:** 1.2.0 **Python version:** 3.9.2 **operating system and version:** Debian 11/bullseye
Owner

Thanks for reporting this! Unlike other borg commands, borg key has a sub-command (export, etc.). borgmatic was passing it to Borg in the incorrect order, resulting in the error you included above. This has now been fixed in master and will be part of the next borgmatic release.

Thanks for reporting this! Unlike other borg commands, `borg key` has a sub-command (`export`, etc.). borgmatic was passing it to Borg in the incorrect order, resulting in the error you included above. This has now been fixed in master and will be part of the next borgmatic release.
witten closed this issue 4 months ago
witten added the
bug
label 4 months ago
Owner

Released in borgmatic 1.6.0!

Released in borgmatic 1.6.0!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#515
Loading…
There is no content yet.