Delaying printing of stats/summary after a backup

I use restic backup in a systemd timer to run it regularly and I use it with --verbose --verbose to be able to roughly inspect what happened.

Sadly journald regularly drops lines from the log due to excessive flooding, which I am fine with so far. Though sadly more often than not, the summary at the end is also dropped due to flood protection, and I’d really like to have that as guaranteed output.

Is there a way to delay the summary by 1 to 5 seconds to circumvent flood protection?

Just wrap it in a simple script that adds sleep 5 after the restic command?

So, on one side you are fine with the fact that some of the information that comes from the --verbose flags are discarded. On the other side you don’t like that some information which comes without the --verbose flags is discarded because your output is generally too verbose, right?

Why not simply remove the --verbose flags?

Restic would print the summary before sleep 5 would be executed.

I often look at the dumped logs via journalctl --follow to get an overview where the backup currently is. Without the -vv I can’t do that.

Though in the meantime, I learned that backup understands --json. I should be able to write myself a wrapper that consumes the JSON and re-emits using a journald compatible logger with appropriate severity and metadata attached.

And I can even collect some metrics from the wrapper and send them over to Prometheus. Metrics that the rest server doesn’t provide on its own for understandable reasons.