[Borgbackup] sending --list output to stdout instead of stderr

Antoine Beaupré anarcat at debian.org
Tue Mar 15 21:32:14 EDT 2016


On 2016-03-15 21:17:22, Sitaram Chamarty wrote:
> On 16/03/16 05:53, Thomas Waldmann wrote:
>>> When using "borg create -v -s -p --list ...", would it be possible to
>>> send the output of the "--list" to stdout instead of stderr?
>>>
>>> I would like to do some post-processing on the list output, while also
>>> seeing progress (-v, -s, -p) on the screen as it runs.
>> 
>> We usually use stderr for log output because stdout might be used for connecting borg to other tools via a pipe (and it will transport file data then), like:
>> 
>> borg extract --stdout ... | dd of=/dev/sdx
>> 
>> stats output is also logged as I expect many people wanting to have that in their backup logs. So it's currently not possible to write this to different files / channels.
>
> Problem solved.  Using the logging conf fixed things for me.  Now I get
> the "-p" I want to see on screen while still getting the list of files
> to process later.  I don't see the summary stats on screen anymore but I
> can do a "tail -15" or so of the logfile if I need that.

Can you show us what configuration you used? I'd be great to have
samples for that in the documentation...

a.
-- 
The steel horse fills a gap in modern life, it is an answer not only to
its needs, but also to its aspirations.  It's quite certainly here to
stay.
                         - Le Vélocipède Illustré, 1869


More information about the Borgbackup mailing list