Document or implement custom ssh command when extracting the configuration files used to create an archive (bootstrap) #767

Closed
opened 2023-10-05 13:58:50 +00:00 by moanos · 4 comments

What I'd like to do and why

I'd like to extract the configuration file from a repo. That repo is accessed via SSH with public key. Therefore also need to adjust the SSH command to extract the file. I think there is no option to do that yet, if there is it would be nice to document this here.

For reference: I create my backups with something like this on server A

repositories:
- path: ssh://backupuser@backupserver.example.org/./backup/reponame
source_directories:
- /mash
ssh_command: ssh -o "StrictHostKeyChecking accept-new" -i /etc/borgmatic.d/sshkey

and try to do this on server B

borgmatic config bootstrap --repository ssh://backupuser@backupserver.example.org/./backup/reponame --destination /tmp --ssh-command "ssh -i mykey"

Other notes / implementation ideas

No response

### What I'd like to do and why I'd like to extract the configuration file from a repo. That repo is accessed via SSH with public key. Therefore also need to adjust the SSH command to extract the file. I think there is no option to do that yet, if there is it would be nice to document this [here](https://torsion.org/borgmatic/docs/how-to/extract-a-backup/#extract-the-configuration-files-used-to-create-an-archive). For reference: I create my backups with something like this on server A ```yml repositories: - path: ssh://backupuser@backupserver.example.org/./backup/reponame source_directories: - /mash ssh_command: ssh -o "StrictHostKeyChecking accept-new" -i /etc/borgmatic.d/sshkey ``` and try to do this on server B ```zsh borgmatic config bootstrap --repository ssh://backupuser@backupserver.example.org/./backup/reponame --destination /tmp --ssh-command "ssh -i mykey" ``` ### Other notes / implementation ideas _No response_
Author

I just realized I can do export BORG_RSH="ssh -i /root/mykey" so it would be nice to document that

I just realized I can do `export BORG_RSH="ssh -i /root/mykey"` so it would be nice to document that
Owner

Good find, yeah! I was just about to suggest that as a work-around. However I think this is a feature that should probably be built into the bootstrap action as well, maybe via a --ssh-command flag as you suggest. So I'll add that as part of this ticket and at least mention it in the documentation. Thanks for filing this!

Good find, yeah! I was just about to suggest that as a work-around. However I think this is a feature that should probably be built into the `bootstrap` action as well, maybe via a `--ssh-command` flag as you suggest. So I'll add that as part of this ticket and at least mention it in the documentation. Thanks for filing this!
Owner

config bootstrap --ssh-command has been implemented in main and will be part of the next release. Thanks again for the suggestion!

`config bootstrap --ssh-command` has been implemented in main and will be part of the next release. Thanks again for the suggestion!
Owner

Released in borgmatic 1.8.6!

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