Bacula-users

Re: [Bacula-users] pre-checking tape for next backup

2008-12-11 03:43:13
Subject: Re: [Bacula-users] pre-checking tape for next backup
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 11 Dec 2008 09:38:21 +0100
Hi,

11.12.2008 03:19, James Harper wrote:
> I asked this question a while back, but I'd like to now figure out a
> solution to it.
> 
> Basically, one of our clients used to run Amanda and now runs Bacula.
> Obviously Bacula is superior :) but one feature they miss from Amanda is
> the ability to be notified if the tape (external disk in this case) has
> not been changed.
> 
> At 11am, Amanda would check and send an email to the backup operator if
> the current tape was not suitable for tonights backup. At 3pm it checks
> again and if the current tape is still not suitable, it emails the
> operator and a few others, on the assumption that the operator is out of
> the office.
> 
> At some sites where we use tapes, the tape is ejected at the end of the
> backup so it's easy to just check if there is a tape inserted or not (it
> is reasonable to assume that if a tape has been put in that it's
> probably the right one) but for usb attached external disks it's not so
> simple, so I would like a more general solution...
> 
> My rules would be:
> 1. Check mounted volume - if no volume then send email
> 2. If status is 'Recycle' (or other immediately usable state) then no
> action
> 3. If status is 'Append' then send email (only room for one backup on a
> tape, maybe this would be configurable)
> 4. If status is 'Used' and it will still be 'protected from overwrite'
> at the time of the next scheduled backup then send email
> 5. If status is 'used' and the tape will be eligible for recycle at the
> time of the next backup then no action
> 6. Otherwise, the situation is something I haven't thought of so send an
> email to me so I can put a rule in for it.
> 
> #1 should just be a mount operation, but then how can I get the name of
> the volume that is currently mounted?

Parse the output of 'echo "sta sd=<device-name>"|bconsole -c ...' or 
use btape.

> #2-6 should just be a bit of creative Sql and some scripting (Python?)

Or Perl, (ba)sh, or any other script language... but yes, I agree.

I'd actually try to create an easily configurable script and publish 
it, if I were you ;-)

> Any comments or suggestions?

I've got a script I use to unload volumes that are full and eligible 
for safe storge and semi-automatically load and scan newly added 
volumes which might be a good starting-point for you. It's Perl, it's 
ugly, but you can have it if you like... just drop me a note.

Arno


> James
> 
> 
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
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>