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. -- Phil Stracchino, CDK#2 DoD#299792458 ICBM: 43.5607, -71.355 ala...@caerllewys.net ala...@metrocast.net p...@co.ordinate.org Renaissance Man, Unix ronin, Perl hacker, Free Stater It's not the years, it's the mileage. ------------------------------------------------------------------------------ Download Intel® 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users