Bacula-users

Re: [Bacula-users] Idea/suggestion for dedicated disk-based sd

2010-04-08 03:49:17
Subject: Re: [Bacula-users] Idea/suggestion for dedicated disk-based sd
From: Kevin Keane <subscription AT kkeane DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 8 Apr 2010 00:37:58 -0700

> -----Original Message-----
> From: Phil Stracchino [mailto:alaric AT metrocast DOT net]
> Sent: Tuesday, April 06, 2010 2:50 PM
> To: bacula-users AT lists.sourceforge DOT net
> Subject: Re: [Bacula-users] Idea/suggestion for dedicated disk-based sd
> 
> On 04/06/10 17:17, Kevin Keane wrote:
> >> Automatic volume deletion can be handled fairly simply using an
> >> admin job that runs a script to delete expired volumes; I've
> >> attached mine as an example.
> >
> > I know, that's what I've been doing. But it is a really ugly hack:
> > for such a routine operation, one really shouldn't have to write a
> > script - let alone a script that has to completely bypass bacula and
> > directly manipulate both the database and bacula's on-disk volumes.
> 
> Um, no, that's definitely not how it should be done.  If you look at
> the
> example script I posted, it uses the console to get a list from the
> Bacula director of the purged volumes (which in my configuration is
> anything in the Scratch pool, but it still double-checks that they are
> in Purged state *anyway*), asks the director to delete them from the
> catalog, then cleans up the files from the disk after successful volume
> deletion.  Directly deleting volumes, or anything else, out of the
> database behind Bacula's back is an extremely bad practice that carries
> a severe risk of leaving the Catalog in an inconsistent state, and one
> should never do it.

Actually, I wasn't clear. I think my script works very similar to yours (and I 
wouldn't even be surprised if it was originally based off yours or something 
somebody else posted, I don't remember).

I'm using the console to make changes, but had to use SQL directly to obtain 
the list of volumes.

The reason is that the console was obviously designed with humans rather than 
scriptability in mind.

Sending commands (such as "prune" or "delete") to the console is fairly 
trivial, but getting data out of it requires far too much parsing and string 
processing.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users