Ssh syntax breake in config file #803

Closed
opened 2023-12-28 17:55:14 +00:00 by jfoucry · 2 comments

What I'm trying to do and why

Hello,

I just want to try to create a repo for a new machine, using the new syntax for the config file.
To not have to reproduce all the setting (from another configuration), I use

borgmatic config generate --source config.yaml --destination config-new.yaml
I changed the hostname the repository/path and the ssh_commandwith the ssh port.

Tried borgmatic rcreate --encryption repokey-aes-ocb but it failed. I change multiple times the way to indicate the custom port but all my try failed. Even with the help of your support in mastodon.

A friend suggest to put the custom port into ~/.ssh/config. The ssh command work immediately, but borgmatic create still failed.

I reread the documentation and find my issue. The path variable must be ssh://user@remotehost/path-to-repository ???!!! And suddenly borg create works. Great \o/

Steps to reproduce

Simply use in repositories/path the "old" ssh syntax: ssh://user@remotehost:path_to_repo, with semi-colon between host and repo path.

Actual behavior

No response

Expected behavior

No response

Other notes / implementation ideas

Wait! The new syntax break the ssh way to indicate the path. Since I use UNIX (a long long time ago, more than 30 years), the ssh syntax is (and still id) ssh://user@remotehost:path-to-go. With a semi colon between the remote host, and the path.

It's not an important bug and reading the documentation solve it in less than 3 minutes. But it brake an old an know by all the UNIX sysadmin around the world. I think this is a mistake in the change of the new syntax.

Excuse my English, my knowledge is very old :-)

borgmatic version

borgmatic --version 1.8.2

borgmatic installation method

FreeBSD ppkg

Borg version

borg --version borg 1.2.6

Python version

python --version Python 3.9.18

Database version (if applicable)

No response

Operating system and version

FreeBSD 14.0-RELEASE-p3

### What I'm trying to do and why Hello, I just want to try to create a repo for a new machine, using the new syntax for the config file. To not have to reproduce all the setting (from another configuration), I use `borgmatic config generate --source config.yaml --destination config-new.yaml` I changed the hostname the `repository/path` and the `ssh_command`with the ssh port. Tried `borgmatic rcreate --encryption repokey-aes-ocb` but it failed. I change multiple times the way to indicate the custom port but all my try failed. Even with the help of your support in mastodon. A friend suggest to put the custom port into `~/.ssh/config`. The ssh command work immediately, but `borgmatic create` still failed. I reread the documentation and find my issue. The path variable must be `ssh://user@remotehost/path-to-repository` ???!!! And suddenly `borg create` works. Great \o/ ### Steps to reproduce Simply use in repositories/path the "old" ssh syntax: `ssh://user@remotehost:path_to_repo`, with semi-colon between host and repo path. ### Actual behavior _No response_ ### Expected behavior _No response_ ### Other notes / implementation ideas Wait! The new syntax break the `ssh` way to indicate the path. Since I use UNIX (a long long time ago, more than 30 years), the `ssh` syntax is (and still id) `ssh://user@remotehost:path-to-go`. With a semi colon between the remote host, and the path. It's not an important bug and reading the documentation solve it in less than 3 minutes. But it brake an old an know by all the UNIX sysadmin around the world. I think this is a mistake in the change of the new syntax. Excuse my English, my knowledge is very old :-) ### borgmatic version borgmatic --version 1.8.2 ### borgmatic installation method FreeBSD ppkg ### Borg version borg --version borg 1.2.6 ### Python version python --version Python 3.9.18 ### Database version (if applicable) _No response_ ### Operating system and version FreeBSD 14.0-RELEASE-p3
jfoucry changed title from Shh syntax breake in config file to Ssh syntax breake in config file 2023-12-28 17:55:33 +00:00
Owner

Thanks for taking the time to file this! Is it possible that you were just combining two different versions of the Borg repository URL syntax? For instance, you say that you expected ssh://user@remotehost:path-to-go to work. However, looking at the Borg documentation on this, I'm not sure that particular syntax is supported. What should work though is the old-style user@remotehost:path-to-go syntax without the ssh:// prefix. If that stopped working, then it would definitely be a bug (even though that syntax is deprecated)!

Thanks for taking the time to file this! Is it possible that you were just combining two different versions of the Borg repository URL syntax? For instance, you say that you expected `ssh://user@remotehost:path-to-go` to work. However, looking at the [Borg documentation](https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls) on this, I'm not sure that particular syntax is supported. What _should_ work though is the old-style `user@remotehost:path-to-go` syntax without the `ssh://` prefix. If that stopped working, then it would definitely be a bug (even though that syntax is deprecated)!
witten added the
question / support
label 2023-12-28 18:03:17 +00:00
Owner

I'm closing this for now, but I'd be happy to continue the discussion and/or reopen if necessary. Thanks!

I'm closing this for now, but I'd be happy to continue the discussion and/or reopen if necessary. Thanks!
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#803
No description provided.