Keep extended-status without suppressing restic output
Hello, according to the doc:
The extended-status flag is disabled by default because it suppresses restic’s output.
Any reason why they are mutually exclusive? I need extended-status turned on for prometheus metrics, but at the same time I would also like to see the usual restic messages whether invoked manually or via schedule (in the schedule log file).
Thanks!
Hey!
Thanks for your enquiry.
There are basically two reasons for that:
- we can parse the restic output directly: the issue is that restic is detecting that the default command output is not a terminal, it's now a unix pipe directed to our input. As such restic is not displaying the fancy terminal interface. This is not the mode we're using though.
- we actually run the
backupcommand using the--jsonflag. In which case restic output is a bunch of json objects that we can easily parse to retrieve all the information we need.
We can fix this issue by coding our own output, based on the information gathered on our input pipe. This is something that we started to work on actually, but got kind-of abandoned (https://github.com/creativeprojects/resticprofile/pull/207).
I will take over the PR at some point, that's something I would also like to see when I run commands manually 👍🏻
Thanks for the prompt response! The text output is definitely easier to read if I just want to quickly check what happened in a previous run. Hope the PR gets revived at some point!