Currently, borgmatic accepts --json only for list and info. Is there any reason it is not implemented for create (borg create --json exists)?
borg create --json
borg prune and check do not seem to accept --json. So there is only create left.
Maybe this would also make a less intrusive implementation of https://github.com/witten/borgmatic/pull/26 possible.
Yup, such a feature makes sense to me. I started out with --json only for list and info because that’s where the initial need was. Do you have any initial use cases for --json on create other than the Prometheus module?
Not really a concrete use case, but I think the consistency and ease of the change alone warrants it.
Released with borgmatic 1.2.3!
I’m not really sure, if I got the commit traffic right…
Seems in my original commit 9aaf78b9dd I added the json=args.json parameter at the check, instead of create call. 98cb2644db fixed that by removing it. But the create command call in borgmatic.py still lacks the json parameter. Right?
Yup, your assessment appears to be correct! Let me know if you’d like to fix it or if you’d like me to.
I will take care of it, I also screwed up the previous attempt, so give me change to screw that up, too. ;-)
Idea: Should we add an ident=2 parameter to json.dumps? Will make it look much nicer if a human happens to read the json output.
That sounds fine to me. Or you could just pipe the result to something like jq.
Ok, see #97. Please have a look, to make sure I didn’t screw up again.
Tangentially related discussion: #53.
No due date set.
This issue currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?