Bacula-users

Re: [Bacula-users] SQL Query to get size of all Full/Diff Backups

2011-03-30 22:23:10
Subject: Re: [Bacula-users] SQL Query to get size of all Full/Diff Backups
From: Dan Langille <dan AT langille DOT org>
To: Rodrigo Renie Braga <rodrigorenie AT gmail DOT com>
Date: Wed, 30 Mar 2011 22:20:15 -0400
On Mar 30, 2011, at 4:46 PM, Rodrigo Renie Braga wrote:

> Hello list.
> 
> Can someone send me the SQL Query to get the size that all my Full, Diff and 
> Inc backups are currently consuming? In my config, I have 5 Pools that store 
> Full Backup tapes, the same happens for Diff and Inc Backups. But if you send 
> me a SQL Query.
> 
> I'm going to use this to know when should I get more tapes for my Storage...

The OP contacted me on IRC and I suggested they post here.  They were asking me 
about this page:

  https://services.unixathome.org/bacula/

SELECT P.Name as name,
       pg_size_pretty( sum( coalesce( m.volbytes, 0 ) )::bigint) as size,
       count(M.mediaid) as tape_count
  FROM pool P, media M
 WHERE P.PoolId = m.poolid
   AND P.name IN ('Incrementals', 'Differentials', 'Fulls')
GROUP BY 1
ORDER BY P.name


------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
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>