On Monday 18 September 2006 02:27, Francisco Reyes wrote:
> Kern Sibbald writes:
> 
> > The algorithm is very clearly described in the manual at:
> > 
http:/www.bacula.org/dev-manual/Automatic_Volume_Recycling.html#SECTION000243000000000000000
> 
> In that url I see:
> Try recycling any purged Volumes
> 
> Does this meet the criteria?
> recycle = 1
> Difference of current time  minus last written is greater than volretention 
> column
> 
>   
> > They do recycle based on the retention periods as far as I know.
> 
> I have 484, which was only 358 yesterday, volumes that meet the criteria 
> above and I am just trying to determine if I am doing something wrong on how 
> I am researching this. Did I miss anything in that criteria?
> 
> Example volume:
> BaculaVolumeDaily0203
> lastwritten: 2006-08-03
> volstatus: Purged
> recycle: 1
> volretention: 604800
> volretention/(3600*24): 7 days which matches my 7 day retention for daily 
> pool
> (CURRENT_DATE-lastwritten::date)::int: 45
> 
> The volume is 45 days, is marked as recycle = 1, volstatus is Purged.
> Shouldn't that volume have been used instead of having new volumes created 
> in that pool?  
> 
> I posted the queries that I used and would be nice if anyone else using 
> postgresql could give them a spin.. and see if others have volumes on 
> simmilar situation.
> 
> > algorithm is not being followed, then I haven't seen clear proof of it.
> 
> I honestly don't know if my criteria above is correct, but would like any 
> feedback to improve it and if I am doing something wrong hopefully fix it.

The above is what one could call "hearsay", not proof.  See below ...

> 
> 
> > few people from time to time say "you see it doesn't work", but without 
> > supplying all the necessary info.
> 
> 
> What information would be helpfull?

- Your version of Bacula
- What database (MySQL, ...) you are using and its version. I see you mention 
that it is PostgreSQL.
- A list of all the volumes in the pool.
- An "llist pool=xxx"
- An "llist volume=yyy"  where you pick one representative volume, which
   should be the one with the oldest LastWritten date.
- Your Job resource
- Your Pool resource
- The complete output of a job where recycling failed.

> 
> > The problem is that the algorithm is rather 
> > complex and most users either don't understand or don't read all the 
little 
> > details.
> 
> Understood..
> 
> I am trying to look into only one part of the whole algorithm.. from the 
> database perspective.. basically I am looking at volumes and their columns 
> .. and trying to see if any of those volumes should have gotten used instead 
> of new ones getting created.

I don't exclude the possibility of a bug.  It is just that after 10 or 20 
false alerts (i.e. user errors), I don't get excited any more since I don't 
have the time to "debug" user problems and program Bacula.

>   
> > The only thing I can say is that I have seen recycling work for 3 years 
now 
> > without fail, and if you read that chapter I am sure you can sit back like 
me 
> > and not worry for a long time.
> 
> I am hopefull I am doing something wrong and that is just a matter of 
> keeping researching and some guidance, but so far I get the impression that 
> somehow many volumes that I believe (and I could be totally wrong) should be 
> re-used are not getting reused.
> 
> > By the way, the database (SQLite 2.x) has remained stable at 170MB,
> 
> My postgresql DB for bacula is 30GB with daily vacuum analyze and 
> autovacuum.. have lots of small files.. and have not even finished adding 
> all our servers to be managed by Bacula.
>   
> > Full backups were running about 30GB, but after cleaning out old Photos 
and 
> > Music files, it dropped to about 10GB ...
> 
> By the time I add all our servers we will be backing up likely close to 
> 1Terabyte. The very near future we need to backup 500G, so getting volumes 
> to be reused properly is a big issue for us.
> 
> For reference the queries I am using, on postgresql, to research this are:
> 
> -- Volumes I believe should have been re-used but arent
> select volumename,mediatype,firstwritten::date,lastwritten::date,
> labeldate::date,volstatus,recycle, volretention,
> volretention/(3600*24) as Retention, (CURRENT_DATE-lastwritten::date)::int  
> as Age
> from media where volstatus = 'Purged' and recycle = 1 and
> volretention/(3600*24) < (CURRENT_DATE-lastwritten::date)::int
> limit 10;
> 
> 
> -- Count only
> select count(*)
> from media where volstatus = 'Purged' and recycle = 1 and
> volretention/(3600*24) < (CURRENT_DATE-lastwritten::date)::int
>  
> 
> -------------------------------------------------------------------------
> 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
> 

-------------------------------------------------------------------------
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