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

Thomas Waldmann tw at waldmann-edv.de
Tue Mar 15 20:23:26 EDT 2016


> 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.

I also do not expect that functionality for the future, except if 
someone comes up with an easy system to configure and control that.

Deciding how to handle output is rather difficult (when to use print, 
when to use print >>stderr, when to use log. There's a little piece 
about it in the docs, but even with that it is not always easily decided.

> PS: please let me know if the correct protocol here is to raise a github
> issue directly instead of asking on the list first.

There is no rule that requires you to use the mailing list first.

It might make sense though if you just have a question or want to 
discuss something. There is also the IRC channel for realtime / near 
realtime communication.

-- 

GPG ID: FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393



More information about the Borgbackup mailing list