Bacula recycles "purged" volumes, so I'm not sure what you mean by "pruned"
here.  What is their volstatus?

Note that a volume is not purged until its volume retention period expires,
even if all the jobs have been pruned.  See "Recycling Algorithm" in
<http://www.bacula.org/rel-manual/Automatic_Volume_Recycling.html>.

To prevent Bacula from creating more than 99 volumes, then you should set the
Maximum Volumes in the pool.

__Martin


>>>>> On Wed, 30 May 2007 09:35:44 +0200, le dahut said:
> 
> I've set LabelMedia = yes and Recycle = yes and there are pruned volumes 
> on my backup media so why doesn't bacula use those volumes instead 
> creating new ones ?
> 
> My objective is to make backup totally automatic using a USB hd. It's to 
> make users able to backup their server without having a root access to 
> it, nor using the command line (web apps have been written to let users 
> schedule some backups).
> 
> What should be the best solution (I've apparently missed something) ?
> 
> 
> K.
> 
> 
> 
> Martin Simmons a écrit :
> > Hmm, you are right, Bacula does set the NumVols itself.
> > 
> > So the problem is that you have less that 109 volumes in the media table
> > (i.e. some missing in the sequence 1...109).  The "simple" LabelFormat with 
> > no
> > variable expansion characters expects NumVols to match the pool.  There is a
> > hack to allow some mismatch (up to 10 missing volumes) but you have reached
> > this now.
> > 
> > I think you need to create the missing volumes manually using the label
> > command.
> > 
> > __Martin
> > 
> > 
> >>>>>> On Tue, 29 May 2007 14:22:29 +0200, le dahut said:
> >> As you can see below, when I update NumVols to reflect the reality from 
> >> 99 to 109, NumVols value is updated by Bacula : when it starts it's put 
> >> back to 99.
> >> I really don't understand why Bacula rewrites the value of NumVols and 
> >> so then generates errors about already existing volume Bacula tries to 
> >> create !!!
> >>
> >> Can someone tell me what's happening here ? I'm becoming really nervous 
> >> about our backups that don't occur since a week now !
> >>
> >>
> >> le dahut wrote :
> >>> I tried but :
> >>> [EMAIL PROTECTED] bacula]# /usr/lib/bacula/sqlite/sqlite 
> >>> /var/bacula/bacula.db
> >>> sqlite> select * from pool;
> >>> 1|Default|99|0|0|1|1|8640000|518400|0|0|2000000000|1|1|Backup|0|ScribeVolume|1|0|0|0|0|0|0
> >>>
> >>> sqlite> UPDATE Pool SET NumVols=109 WHERE Name='Default';
> >>> sqlite> select * from pool;
> >>> 1|Default|109|0|0|1|1|8640000|518400|0|0|2000000000|1|1|Backup|0|ScribeVolume|1|0|0|0|0|0|0
> >>>
> >>> (here it has been correctly changed)
> >>> [EMAIL PROTECTED] bacula]# /etc/init.d/bacula-dir start
> >>> Starting the Bacula Director:                                   [  OK  ]
> >>>
> >>> *list pool
> >>> Automatically selected Catalog: MyCatalog
> >>> Using Catalog "MyCatalog"
> >>> +--------+---------+---------+---------+----------+--------------+
> >>> | PoolId | Name    | NumVols | MaxVols | PoolType | LabelFormat  |
> >>> +--------+---------+---------+---------+----------+--------------+
> >>> | 1      | Default | 99      | 0       | Backup   | ScribeVolume |
> >>> +--------+---------+---------+---------+----------+--------------+
> >>>
> >>>
> >>> Is there a limit on NumVols when using SQLITE ?
> >>>
> >>> K.
> >>>
> >>>
> >>>
> >>> Martin Simmons a écrit :
> >>>>>>>>> On Thu, 24 May 2007 09:35:18 +0200, le dahut said:
>>>>> Here are some additional informations :
> >>>>>
>>>>> *list volumes
>>>>> Pool: Default
>>>>> ...
>>>>> | 108     | ScribeVolume0108 | Full      | 1       | 1999949066 | 0 
>>>>>     | 5184000      | 1       | 0    | 0         | File      | 2007-05-06 
>>>>> 02:01:39 |
>>>>> | 109     | ScribeVolume0109 | Full      | 1       | 1999936408 | 0 
>>>>>     | 5184000      | 1       | 0    | 0         | File      | 2007-05-13 
>>>>> 02:20:23 |
>>>>> ...
> >>>>>
>>>>> *list pools
>>>>> +--------+---------+---------+---------+----------+--------------+
>>>>> | PoolId | Name    | NumVols | MaxVols | PoolType | LabelFormat  |
>>>>> +--------+---------+---------+---------+----------+--------------+
>>>>> | 1      | Default | 99      | 0       | Backup   | ScribeVolume |
>>>>> +--------+---------+---------+---------+----------+--------------+
> >>>>>
>>>>> *show pools
>>>>> Pool: name=Default PoolType=Backup
>>>>>        use_cat=1 use_once=0 cat_files=1
>>>>>        max_vols=0 auto_prune=1 VolRetention=3 months 10 days
>>>>>        VolUse=6 days  recycle=1 LabelFormat=ScribeVolume
>>>>>        CleaningPrefix=*None* LabelType=0
>>>>>        RecyleOldest=1 PurgeOldest=0 MaxVolJobs=0 MaxVolFiles=0
>>>>>        MigTime=0 secs MigHiBytes=0 MigLoBytes=0
> >>>>>
> >>>>>
>>>>> This night, Bacula tried again to create those volumes, why ???!
> >>>> Because the NumVols is 99 in the catalog.  You could try setting this to 
> >>>> 109
> >>>> using an sql command such as
> >>>>
> >>>> UPDATE Pool SET NumVols=109 WHERE Name='Default';
> >>>>
> >>>> Do you have 109 volumes or did the Pool and Media tables get out-of-sync
> >>>> somehow?
> >>>>
> >>>> __Martin
> >>>>
> >>>>
>>>>> K.
> >>>>>
> >>>>>
> >>>>>
>>>>> le dahut wrote :
> >>>>>> Hello,
> >>>>>>
> >>>>>> I used bacula-1.38, since I updated it to 2.0.3, it backuped 4 times 
> >>>>>> ok 
> >>>>>> and then it errors with :
> >>>>>> """
> >>>>>> 23-May 15:53 127.0.0.1-dir: Client1.2007-05-23_15.32.54 Warning: 
> >>>>>> Wanted 
> >>>>>> to create Volume "ScribeVolume0109", but it already exists. Trying
> >>>>>> again.
> >>>>>> 23-May 15:53 127.0.0.1-dir: Client1.2007-05-23_15.32.54 Error: Too 
> >>>>>> many 
> >>>>>> failures. Giving up creating Volume name.
> >>>>>> """
> >>>>>>
> >>>>>>
> >>>>>> I noticed that that the concerned volumes are not always the same. For 
> >>>>>> example today bacula errors about "ScribeVolume0100" to 
> >>>>>> "ScribeVolume0109" and on may 20th it errored on "ScribeVolume0090 to 
> >>>>>> ScribeVolume0097".
> >>>>>>
> >>>>>> Here's part of my SD configuration :
> >>>>>> Device {
> >>>>>>    Name = FileStorage
> >>>>>>    Media Type = File
> >>>>>>    Archive Device = /var/sauvegardes
> >>>>>>    LabelMedia = yes;                   # lets Bacula label unlabeled 
> >>>>>> media
> >>>>>>    Random Access = Yes;
> >>>>>>    AutomaticMount = yes;               # when device opened, read it
> >>>>>>    RemovableMedia = no;
> >>>>>>    AlwaysOpen = no;
> >>>>>> }
> >>>>>>
> >>>>>> the DIR conf :
> >>>>>> Pool {
> >>>>>>    Name = Default
> >>>>>>    Pool Type = Backup
> >>>>>>    Recycle = yes
> >>>>>>    AutoPrune = yes
> >>>>>>    Volume Retention = 100 days
> >>>>>>    LabelFormat = "ScribeVolume"
> >>>>>>    Recycle Oldest Volume = yes
> >>>>>>    Maximum Volume Bytes = 2 gb
> >>>>>>    Volume Use Duration = 6 days
> >>>>>> }
> >>>>>>
> >>>>>>
> >>>>>> liste volumes shows all the concerned volumes in database ... what's 
> >>>>>> happening ?
> >>>>>>
> >>>>>>
> >>>>>> K.
> >>>>>>
> >>>>>>
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to