list with multiple repositories & json #155
Labels
No labels
blocked
breaking
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#155
Loading…
Reference in a new issue
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?
I have a configuration where there is a default job in /etc/borgmatic/config.yaml which uses one repo, and a little application job in /etc/borgmatic.d/app1.yaml
if I now use
borgmatic --list --jsonor even just for one repoborgmatic --list --json --repository REPO1i get following error:Error:Multiple JSON root elements[Code 22, Structure 240]
in the second case there is only a
[]appended after the json from repository 1I wasn't able to reproduce this problem with a similar set up. What version of borgmatic are you using? (
borgmatic --versionorpip3 show borgmatic) Also, posting your borgmatic config files (with sensitive information redacted) may be helpful. Thanks!thanks for your feedback.
i have added everything i think is needed. tell me if something is missing.
file:
/etc/borgmatic/config.yamlfile:
/etc/borgmatic.d/app1.yamlthe list command:
borgmatic --list --repository /mnt/Backup/app1 --jsonoutput:
You see the first two characters are
[]i think from the other repository, which is not selected.but if i use this output in an application, or just in a online json beautifier it gives an error.
for example here:
https://jsonformatter.curiousconcept.com/
Error:Multiple JSON root elements[Code 22, Structure 3]Thanks for the detailed info! Based on that, I did manage to get a local repro of the problem. Now to see about a fix...
Okay, this is now fixed in borgmatic 1.3.1, just released. Please let me know if you have any other issues with the JSON output.