Re: [Bacula-users] Re : SQL help needed predicting next tapes to recycle

2006-08-05 Thread Eric Bollengier
> On Sat, Aug 05, 2006 at 02:58:01PM +0200, Eric Bollengier wrote: > >FROM_UNIXTIME( > > UNIX_TIMESTAMP(Media.LastWritten) > > + (Media.VolRetention) > >) AS expire > > Or, if you're using Postgres rather than MySQL... > > lastwritten + volretention * interval

Re: [Bacula-users] Re : SQL help needed predicting next tapes to recycle

2006-08-05 Thread kodis
On Sat, Aug 05, 2006 at 02:58:01PM +0200, Eric Bollengier wrote: >FROM_UNIXTIME( > UNIX_TIMESTAMP(Media.LastWritten) > + (Media.VolRetention) >) AS expire Or, if you're using Postgres rather than MySQL... lastwritten + volretention * interval '1 second' as

[Bacula-users] Re : SQL help needed predicting next tapes to recycle

2006-08-05 Thread Eric Bollengier
Hi, You can find informations about that on bacula manual http://bacula.org/dev-manual/Automatic_Volume_Recycling.html#SECTION000243000 You can try this (change Pool.Name and MediaType) SELECT Media.VolumeName AS volumename, Media.VolStatus AS volstatus, Media.LastWr