Closed borkd closed 1 year ago
As far as I know, the progress bars do not show at all when you are using a non-interactive terminal. I use a systemd service to run my backups and don't get progress bars in the logs. Can you describe your environment in more detail where you get the non-expected progress bars?
Logged (screen) sessions with full terminal emulation
Mhh - if you use a standard terminal, the progress bars are shown... I hesitate a bit to add an option to rustic. In my opinion the standards defined by the indicatif crate should be ok, as this is exactly designed to provide progress bars and handle all kinds of edge cases...
Note that the progress bars are printed to stderr, so you can try to use rustic ... 2>/dev/null
to get rid of the progress bars.
This will also omit the logging output, but this you could also redirect to a file using --log-file
.
Actually, I don't really see why you are using your logged screen sessions setup. Which benefit do you see to use this instead of an automated run? Or the other way round: which problem are you solving by using this setup?
I'm experimenting with rustic as a drop in replacement for restic in an existing workflow. Part of that workflow sets up the environment for restic. Besides running restic/rustic operations on repositories, their respective stdout and stderr is parsed to extract metrics which are then used elsewhere.
Having output limited to essential info and stats, or periodic status updates like in the restic's _FPS is super handy when processes run for days or even weeks and may have to be interactively inspected during troubleshooting
About the metrics: Do you know that rustic stores a lot of metrics already in the snapshot?
You can access them by using rustic snapshot <ID> --long
or rustic snapshot <ID> --json
.
You can also get the metrics for all snapshots if you omit the <ID>
in the above command. Also <ID>
= latest
is supported. Are there other metrics than the saved ones which you are missing?
Yes. Extra metadata stashed by rustic is handy, but does not cover everything I care about.
Switching between production/restic and testing/rustic also means I need to capture everythig I care about from restic runs too, at least until such functionality is adopted there
1s
, 1m
, 10ms
instead of a FPS.The default interval is still 100ms.
@borkd Can you test if #279 suits your needs?
Disabling progress bars is not possible by #279 (but by using a non-interactive terminal or redirecting stderr). However, you can use a very long interval like 100y
to get a similar effect.
@borkd Can you test if #279 suits your needs?
way more flexible, thanks!
Option to show progress info with given frequency as a line of text without control characters would be super useful. See restic's RESTIC_PROGRESS_FPS for the behavior I have in mind.
Option to force progress bars off altogether would work as an alternative when rustic is to be executed unattended under logged screen sessions. As of now session logfiles which take ~20 KiB each with restic use hundreds of megabytes each with rustic.