[Box Backup] Monitor uploaded files

Chris Wilson chris at qwirx.com
Tue Nov 27 11:23:00 GMT 2012

Hi Olivier,

On Tue, 27 Nov 2012, Olivier Croquette wrote:

> Oups, I knew these options, of course, sorry !
> However, there are 2 limitations:
> 1) I don't want to store the whole TRACE log, because it's really huge, and I don't need it.
> That's why I use something like:
> bbackupd -c "$BASEDIR/etc/bbackupd.conf" -D -k -V 2>&1 \
>  | "$BASEDIR/logfilter" >> "$LOGFILE" &
> The perl script filters lines I am interested in : /(\s(INFO|NOTICE):|TRACE:.*will upload)/;
> 2) Independently of these settings, it looks to me as if the info is sent to syslog anyway, leading to a higher CPU load and such messages:
> Nov 27 11:28:43: --- last message repeated 2 times ---
> Nov 27 11:28:43 mbp2011 bbackupd[1829]: *** process 1829 exceeded 500 log message per second limit  -  remaining messages this second discarded ***

Yes, that will happen if you run with -V. I'm considering adding an option 
to control console verbosity independently of syslog, but I DO NOT 
recommend doing what you are doing above. If your logfilter script dies, 
bbackupd will too.

I recommend that you write to a file, and use a backup-finish script to 
post-process the logfile, write whatever you want to keep to whatever 
logs, and delete the logfile. And don't run with -D -k -V in production.

If you reall must run with -V, then I recommend you configure your syslogd 
to route debug messages from bbackupd to nowhere. That should take very 
little CPU time.

Another option is that I could add logging support to the command socket. 
Then you could write your own client to connect to that socket and collect 
the log messages that you're interested in.

Cheers, Chris.
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <chris+sig at qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |

More information about the Boxbackup mailing list