Bacula-users

Re: [Bacula-users] sql to add tape in pool.

2010-08-31 17:40:37
Subject: Re: [Bacula-users] sql to add tape in pool.
From: Phil Stracchino <alaric AT metrocast DOT net>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 31 Aug 2010 17:38:01 -0400
On 08/31/10 16:30, Prashant Ramhit wrote:
> Hi All,
> 
> I want to add 52 volume in a pool.
> 
> Could someone please send me the sql to add a volume with the following 
> parameters

Why would you want to use SQL to do this?

> Volume name= "week40" ( this is a variable  and will be auto generated, 
> for the time being please consider week40)
> Catalogue=weekly_offsite
> Pool=weekly
> Slot=6
> InChanger=yes
> 
> And is there any more command to type in bconsole after i've applied 
> this to mssql db.

You shouldn't be touching the SQL DB to do this at all.  If you're going
to go doing stuff in Bacula's catalog database behind its back, don't be
surprised if things break in unexpected ways later.  You can (and
should) perform this entire operation using bconsole.

There are two steps you need to perform.

The first, unfortunately time-consuming, is to label the volumes using
the 'label' command.  Tapes need to be in the drive to be labeled, so
you can't practically automate the process unless you have a robotic
tape library, in which case you should already have barcode labels on
your tapes and you can just load them into the library and issue a
'label barcodes' command.

The second step is to add your new volumes to your weekly pool using the
'add' command.  This is very simple as you can tell it the base volume
name, how many volumes you want to create, and the starting number.
Give it 'week' for base name, 1 for starting number, and 52 for how many
volumes to add, and you should be all set.

Remember when labeling your tapes that if doing a bulk addition in this
manner, Bacula will default to using four digits plus the specified base
name to generate the label.  This behavior can be overridden in the Pool
specification by using the Label Format directive.


-- 
  Phil Stracchino, CDK#2     DoD#299792458     ICBM: 43.5607, -71.355
  alaric AT caerllewys DOT net   alaric AT metrocast DOT net   phil AT 
co.ordinate DOT org
         Renaissance Man, Unix ronin, Perl hacker, Free Stater
                 It's not the years, it's the mileage.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
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>