Hi Mark,

I've written a nagios shell script to check my pools in the way you describe. I also remember that Arno Lehmann did something similar in perl (it is distibuted with the bacula sources)

Regards,
Ludovic Strappazon.

[EMAIL PROTECTED] a écrit :
Is there any way to have bacula predict how many volumes will be needed for the next night's backup?
My goal is to make sure that the autochanger is always loaded with enough tapes
to handle the next night's backup, without changing tapes every day.

I'm interested in having bacula notify me in advance that it guesses that the
following night's backup will require "N" volumes. I don't want to run
"estimate" for each client (which is a time-consuming and resource intensive
action), and then sum the results. It would be great if bacula made use of
information that's in the database to get the average of the sizes of the last
"X" backups of the same level that's scheduled for the next backup (ie., full,
incremental, differential) for each client, and then added a user-defined
fudge-factor (maybe 10%) to guess at the size of the upcoming backup for all
scheduled jobs.

For example, most of our non-full backups are under 100GB for all clients
combined, so our autochanger can run for a long time without manually removing
full tapes and putting in new ones. However, full backups can be anywhere from
40GB to over 2TB (depending on the client). To reduce contention, full backups
are set up with a staggered schedule--each client does a "full" on a different
night. It would be nice to get some warning from bacula that the next night's
backup will "probably" take 6 volumes, so that I can make sure the enough empty
(or over-writeable) tapes are loaded.


Any suggestions about scripting such an "early warning system"? I'm thinking of something like:

----------- bad pseudo-code ---------------------------
        foreach $client sqlquery("Get list of clients scheduled to backup 
tonight")
        {
                $backup_level=sqlquery("Get level of next backup for $client");
                
                $size=average(sqlquery "size in GB of all backups for
                                $client of $backup_level");
        
                $predictedsize=$total + $size;
        }

        $predictedsize=$predictedsize * $fudgefactor;

        foreach $volsize (sqlquery("Select VolumeSize in GB
                                        where VolumeStatus='Full'"))
        {
                $volsizetotal=$volsize + $volsizetotal;
$volcount++; }

        $average_GB_to_fill_volume=$volsizetotal/$volcount;

        $volumes_needed=$predictedsize / $average_GB_to_fill_volume;

        roundup($volumes_needed);

        print "There will be $volumes_needed needed for tonight's backup";
------------ EO bad pseudo-code -------------------------------------------



Thanks,

Mark
----
Mark Bergman                      [EMAIL PROTECTED]
System Administrator
Section of Biomedical Image Analysis             215-662-7310
Department of Radiology,           University of Pennsylvania

http://pgpkeys.pca.dfn.de:11371/pks/lookup?search=mark.bergman%40.uphs.upenn.edu



The information contained in this e-mail message is intended only for the 
personal and confidential use of the recipient(s) named above. If the reader of 
this message is not the intended recipient or an agent responsible for 
delivering it to the intended recipient, you are hereby notified that you have 
received this document in error and that any review, dissemination, 
distribution, or copying of this message is strictly prohibited. If you have 
received this communication in error, please notify us immediately by e-mail, 
and delete the original message.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Attachment: check_bacula_pools.sh
Description: application/shellscript

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to