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

Closed
opened 2022-03-31 10:19:28 +00:00 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 added the
bug
label 2022-04-23 21:07:15 +00:00
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
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#515
No description provided.