resticprofile icon indicating copy to clipboard operation
resticprofile copied to clipboard

Keep extended-status without suppressing restic output

Open pirxthepilot opened this issue 5 months ago • 2 comments

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!

pirxthepilot avatar Jul 14 '25 20:07 pirxthepilot

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 backup command using the --json flag. 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 👍🏻

creativeprojects avatar Jul 16 '25 19:07 creativeprojects

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!

pirxthepilot avatar Jul 19 '25 19:07 pirxthepilot