How to get verbose progress updates but also log with "tee"

Hi @kellytrinh,

As far as I know restic only shows progress if output is a tty.

If on Linux you could use script tool to workaround this issue:

script -q -c "here your restic command" | tee /path/to/logfile

Then you will see the progress and you get a log. Keep in mind that in the log there will be a lot of “progress garbage” so if you want to get a clean logfile, once restic command ends:

cat /path/to/logfile > /path/to/logfile-without-progress-garbage

Unfortunately, the script tool solution won’t work if you don’t run it in a tty so if you plan to use cron it won’t work (at least in the test I did a few minutes ago).

The ideal is that restic, in a non tty execution, would write only 1%, 5%, 10% progress or something like that to output so we could check what is the backup progress.

There is an open issue regarding this subject Periodically print progress information when output device is not TTY · Issue #2265 · restic/restic · GitHub but I’m afraid it didn’t receive any attention.

I hope someone else could give a solution to this issue (I’m interested too :wink: ).

1 Like