Invalid override value when using command-line override to specify a remote repository location #528
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#528
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I try to use override option:
--override location.repositories=[ssh://borg@server:1234/~/backup_repository]
.We have two external storage repositories configured, for redundancy. But as soon as one of these is not available or fails for some reason, borgmatic would fail (instead of continuing with the next repository before failing).
What we actually want is separate failures for separate repositories, and as far as I understand the documentation of borgmatic, this behaviour is not supported out of the box. For this reason, we call borgmatic for each remote repository separately.
Steps to reproduce (if a bug)
Actual behavior (if a bug)
Output:
Expected behavior (if a bug)
It should be possible to use the
--override.location.repositories
option with a list of values that contain a colon.Furthermore, the error message
in "<file>"
was confusing, as my actual configs also uses includes to merge settings from a common configuration file (and i initially thought the culprit would be an override that happens during config merge). I spent a lot of time trying to figure out how these could have a syntax error whilevalidate-borgmatic-config
does not complain. The new message since borgmatic 1.5.22 helps already, but the messagein "<command-line override>"
would have been even more helpful to distinguish from config merge.Other notes / implementation ideas
This did work in the past with borgmatic 1.5.18, but after a fresh install with the same version, it suddenly started to fail although I did not change the scripts.
For this reason, I suspect a problem with YAML parsing that starts to appear with some recent (well, more recent than the two-year-old setup that worked) version of a YAML parsing library or other dependencies.
Environment
borgmatic version: 1.6.0 (as well as 1.5.18 and 1.5.24)
borgmatic installation method: custom docker image
Borg version: 1.1.11
Python version: 3.8.10
pip freeze:
operating system and version: Docker image based on Alpine Linux
i guess
ruamel.yaml
expects the remote server repository string to be enclosed in quotes. This is not obvious from the examples in the documentation.But using a double-quoted or single-quoted string in the command does not help (i did try that):
Workaround: Enclose both the repository url and the whole array in quotes:
This works. (Quoting either repository url or whole array, but not the repository url string, does not work)
It would be helpful to update the examples in https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/#configuration-overrides accordingly :)
Thank you for detailed ticket and all the diagnosing! Super helpful. I've improved the error message and also updated the documentation as you suggest (update will be live momentarily). Here's an example of the new error message:
This is currently in the master and will be part of the next release.
Released in borgmatic 1.6.1!