Bacula-users

Re: [Bacula-users] Query to list volumes available in the pool

2013-05-19 21:46:59
Subject: Re: [Bacula-users] Query to list volumes available in the pool
From: LDC - Gustavo El Khoury <gustavo AT ldc.usb DOT ve>
To: Isamar Maia <isamar AT gmail DOT com>
Date: Sun, 19 May 2013 21:12:55 -0430
On 19/05/2013, at 07:32 p.m., Isamar Maia <isamar AT gmail DOT com> wrote:

> Pretty cool. Thanks.
> 
> 2013/5/19 Dan Langille <dan AT langille DOT org>:
>> 
>> On May 18, 2013, at 6:35 PM, Isamar Maia wrote:
>> 
>>> Hi Folks,
>>> 
>>> I need a SQL query for Bacula to list the volumes available in the
>>> pool, including those to be recycled
>>> due to expiration of their retention periods but weren't still recycled.
>>> 
>>> For time being, I am using this query:
>>> 
>>> select count(*) as count from Media where PoolId = X and StorageId = Y
>>> and (VolStatus = 'Purged' or VolStatus = 'Recycle' or VolStatus =
>>> 'Append');
>>> 
>>> 
>>> But, it doesn't include volumes up to be recycled due their job/volume
>>> retention periods. I need to include that info into my SQL query.
>> 
>> 
>> Does this help?  https://services.unixathome.org/bacula/recycling.php
>> 
>> You can view the SQL.  It's customized for PostgreSQL, but you can adjust 
>> that easily enough.
>> 
>> --
>> Dan Langille - http://langille.org
> 
> 
> 
> -- 
> Isamar Maia
> Cel. VIVO SSA:  (55) 71-9146-8575
> Fixo:  (55) 71-4062-8688
> Skype ID: isamar.maia
> "A vida é muito curta para ser pequena" (Benjamin Disraeli)
> 
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

I know it's going to sound stupid, but why a simple list volumes command 
doesn't work? On my server it shows disabled, recycled and purged volumes in 
addition to full and appending ones :/

LDC - Gustavo El Khoury
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users