btrbk icon indicating copy to clipboard operation
btrbk copied to clipboard

How to log the actual transfer size reported by btrbk?

Open ceremcem opened this issue 2 years ago • 3 comments

Partly related to #280

I try to capture all logs in order to parse later to get statistics, like so:

btrbk -c conf.calculated --progress -v run | tee mylog.txt

However, the transfer size information is not present in the mylog.txt. How can I redirect the summary: 50.7 MiByte in 4.0sec - average of 12.6 MiB/s line into the log file?

ceremcem avatar Dec 11 '22 16:12 ceremcem

In case you have not found the answer, mbuffer is what is creating the progress text and it writes it to stderr (fd 2)

/szaydel/mbuffer/blob/master/mbuffer.c#L159

Caedis avatar Dec 25 '22 04:12 Caedis

launching the backup with the following command should do the trick :

btrbk -c conf.calculated --progress -v run 2>&1 | tee mylog.txt

Oupsman avatar Jan 11 '23 15:01 Oupsman

Can you get the lines with 2>&1 | tee ...:

summary: 18.8 MiByte in  0.4sec - average of 51.9 MiB/s                                                                                                                                          

Because I'm using exact same command btrbk -c conf.calculated --progress -v run 2>&1 | tee mylog.txt and it doesn't log those summary lines.

ceremcem avatar Jan 12 '23 08:01 ceremcem