Describe the bug
After updating Backrest to 1.13.0, checking an SFTP repository fails because the generated restic command appears to pass an invalid --option=sftp.args=... value. I wanted to adapt a hook, but now cannot save it.
Backrest reports:
invalid argument "sftp.args=-oBatchMode=yes -i \"/root/.ssh/id_ed25519_backrest_hetzner\" -p 23 -oUserKnownHostsFile=\"/root/.ssh/known_hosts\"" for "-o, --option" flag: parse error on line 1, column 30: bare " in non-quoted-field
The generated flag seems to be:
--option=sftp.args='-oBatchMode=yes -i "/root/.ssh/id_ed25519_backrest_hetzner" -p 23 -oUserKnownHostsFile="/root/.ssh/known_hosts"'
To Reproduce
Steps to reproduce the behavior:
-
Update Backrest to 1.13.0
-
Configure an SFTP repository using custom SFTP args, including quoted paths, for example:
-oBatchMode=yes -i "/root/.ssh/id_ed25519_backrest_hetzner" -p 23 -oUserKnownHostsFile="/root/.ssh/known_hosts"
-
Run a repository check
-
See the error shown in the screenshot
Expected behavior
The repository check should run successfully, or Backrest should generate/pass the sftp.args option in a format accepted by restic.
Screenshots
Platform Info
- OS and Architecture: Linux / Docker on Raspberry Pi 5 arm64
- Backrest Version:
1.13.0
Additional context
This started after updating to Backrest 1.13.0. The issue seems related to quoting/escaping in the generated --option=sftp.args=... argument.
Luckily backups still work fine with the saved config, but I cannot modify it now.
Describe the bug
After updating Backrest to
1.13.0, checking an SFTP repository fails because the generatedresticcommand appears to pass an invalid--option=sftp.args=...value. I wanted to adapt a hook, but now cannot save it.Backrest reports:
The generated flag seems to be:
--option=sftp.args='-oBatchMode=yes -i "/root/.ssh/id_ed25519_backrest_hetzner" -p 23 -oUserKnownHostsFile="/root/.ssh/known_hosts"'To Reproduce
Steps to reproduce the behavior:
Update Backrest to
1.13.0Configure an SFTP repository using custom SFTP args, including quoted paths, for example:
Run a repository check
See the error shown in the screenshot
Expected behavior
The repository check should run successfully, or Backrest should generate/pass the
sftp.argsoption in a format accepted byrestic.Screenshots
Platform Info
1.13.0Additional context
This started after updating to Backrest
1.13.0. The issue seems related to quoting/escaping in the generated--option=sftp.args=...argument.Luckily backups still work fine with the saved config, but I cannot modify it now.