Bacula-users

Re: [Bacula-users] Calculating number of Tapes

2009-09-20 17:39:41
Subject: Re: [Bacula-users] Calculating number of Tapes
From: Hannes Gruber <bacula01 AT usw DOT at>
To: bacula-users AT lists.sourceforge DOT net
Date: Sun, 20 Sep 2009 23:35:08 +0200
Juche,

I use something like this as my Mail command in message resource, so I
get an estimation of the next tape needed with every Backup report.

Messages {
  Name = Standard
  mailcommand = "/bin/bash -c '(cat;baculadone -n)|/usr/sbin/bsmtp -h
localhost -f \"Bacula Backup %d \<%d AT usw DOT at\>\" -s \"Bacula: %t %e of %c
%l\" %r '"
  operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"Bacula Backup %d
\<%d AT usw DOT at\>\" -s \"Bacula: Intervention needed for %j\" %r"
  console = all, !skipped, !saved
  append = "/var/log/bacula/bacula.log" = all, !skipped
  catalog = all, !skipped
operator = xxx AT usw DOT at = mount
mail     = xxx AT usw DOT at = all, !skipped
}

The Script Bacula done will do the following:

echo -e "\nWhats next:\n"
echo 'status dir days=7' | bconsole | awk '/Scheduled Jobs:/{p=1}
p{print} /^====$/{p=0}' \
        || echo -e "\n\nERROR: there was an error guessing the next
tapes used.\n"

echo -e "\nWhat about the Tapes:"
for pool in "S2-TapePool" "S2-ArchivePool"; do
 echo -e "\n-) $pool:"
 echo "list media pool=\"$pool\"" | bconsole | awk '/You have
messages/{next} /Using Catalog/{p=1;next} p{print}' \
            || echo -e "\n\nERROR: there was an error listing the Tapes.\n"
done
echo
exit 0


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>