On 01/16/13 14:33, Jack Cobb wrote:
> We are using Bacula 5.0.3 on an Ubuntu 10.04 server using MySQL as the
> database engine. We review each day’s backup to verify it completed but now
> our auditors are asking for a report that shows the backup job results for the
> previous twelve months...which is the amount of time we keep our backup history.
>
>
>
> Has anyone ever generated a report using the Bacula history and if so what
> tools did you use? Thanks.
Hi Jack... couldn't you just use the "list jobs" bconsole output?
It is formatted reasonably enough as-is, or you could script something to
convert it into CSV format which could be pulled into a spreadsheet.
A quick (and very dirty) combination of bconsole, grep and sed might do the
trick like so:
echo "list jobs" | bconsole -c /etc/bacula/bconsole.conf \
| grep "^|" | sed -e 's/|//g' -e 's/,//g' -e 's/^ \+//' \
-e 's/ \+/ /g' -e 's/ \+$//' -e 's/ /,/g'
Which outputs:
--[snip]--
18966,SpeedyFull,2013-01-15,20:30:21,B,I,23614,1816360338,T
18967,SpeedyMusic,2013-01-15,20:30:21,B,I,0,0,T
18969,Voip,2013-01-15,20:30:21,B,I,152,1174965049,T
18980,Voip,2013-01-15,20:30:21,C,I,152,1174982569,T
18970,Satch,2013-01-15,20:30:23,B,I,84,1311771664,T
18965,NewbyFull,2013-01-15,20:30:26,B,I,1513,812848531,T
18971,Zimbra,2013-01-16,02:45:00,B,F,387775,16323518664,T
18972,Helpdesk,2013-01-16,02:46:58,B,F,182057,9736122612,T
18973,Newby_MustHave,2013-01-16,04:00:05,B,F,22914,6787198696,T
18974,Catalog,2013-01-16,04:04:36,B,F,9,11054415984,T
--[snip]--
Of course, all of our Job Names contain no spaces so the above output does not
insert double quotes, but that is easy enough to fix if you have spaces in
your job names.
Hope this helps
--
Bill Arlofski
Reverse Polarity, LLC

Bill,
Thanks for the information. Using your ideas and with help from one of our
MySQL programmers we were able to create a script that will work for us.
Jack
On 01/16/13 14:33, Jack Cobb wrote:
> We are using Bacula 5.0.3 on an Ubuntu 10.04 server using MySQL as the
> database engine. We review each day's backup to verify it completed
> but now our auditors are asking for a report that shows the backup job
> results for the previous twelve months...which is the amount of time we
keep our backup history.
>
>
>
> Has anyone ever generated a report using the Bacula history and if so
> what tools did you use? Thanks.
Hi Jack... couldn't you just use the "list jobs" bconsole output?
It is formatted reasonably enough as-is, or you could script something to
convert it into CSV format which could be pulled into a spreadsheet.
A quick (and very dirty) combination of bconsole, grep and sed might do the
trick like so:
echo "list jobs" | bconsole -c /etc/bacula/bconsole.conf \
| grep "^|" | sed -e 's/|//g' -e 's/,//g' -e 's/^ \+//' \
-e 's/ \+/ /g' -e 's/ \+$//' -e 's/ /,/g'
Which outputs:
--[snip]--
18966,SpeedyFull,2013-01-15,20:30:21,B,I,23614,1816360338,T
18967,SpeedyMusic,2013-01-15,20:30:21,B,I,0,0,T
18969,Voip,2013-01-15,20:30:21,B,I,152,1174965049,T
18980,Voip,2013-01-15,20:30:21,C,I,152,1174982569,T
18970,Satch,2013-01-15,20:30:23,B,I,84,1311771664,T
18965,NewbyFull,2013-01-15,20:30:26,B,I,1513,812848531,T
18971,Zimbra,2013-01-16,02:45:00,B,F,387775,16323518664,T
18972,Helpdesk,2013-01-16,02:46:58,B,F,182057,9736122612,T
18973,Newby_MustHave,2013-01-16,04:00:05,B,F,22914,6787198696,T
18974,Catalog,2013-01-16,04:04:36,B,F,9,11054415984,T
--[snip]--
Of course, all of our Job Names contain no spaces so the above output does
not insert double quotes, but that is easy enough to fix if you have spaces
in your job names.
Hope this helps
--
Bill Arlofski
Reverse Polarity, LLC
----------------------------------------------------------------------------
--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and
much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
Bacula-users mailing list
Bacula-users@...
https://lists.sourceforge.net/lists/listinfo/bacula-users

Le 2013-01-16 20:33, Jack Cobb a écrit :
> We are using Bacula 5.0.3 on an Ubuntu 10.04 server using MySQL as
> the database engine. We review each day's backup to verify it
> completed but now our auditors are asking for a report that shows the
> backup job results for the previous twelve months...which is the
> amount of time we keep our backup history.
>
> Has anyone ever generated a report using the Bacula history and if so
> what tools did you use? Thanks.
>
> Jack Cobb
>
> MIS Department
>
> Skyline Corporation
>
> 574.294.6521 x.362
>
> jcobb@...
Hello,
I think you should have a look on reportula, webacula, bacula-web.
They can help you to get the data pieces you will have to provide to
auditors.
Good luck (I had to do it for SOX Compliancy)
HTH/
Jérôme Blion.