Hi, 07.05.2009 15:01, Mike Ruskai wrote: > On 05/07/2009 06:44, Arno Lehmann wrote: >> You could always tweak the catalog so that the latest full backup and >> all backups based on it look like they were made with the new file >> set. If you're comfortable with using a database tool like psql or >> mysql, and you know what you do, that's a safe thing. Which still >> implies you should make sure you have a valid catalog dump :-) >> >> Arno >> >> > I'm using MySQL, and have the then most recent Bacula databases at any > given time (a DB dump is run daily, with the lowest priority, so all > jobs finish before it does). > > I've no fear of SQL, so I'd appreciate a pointer on which columns in > which tables are relevant.
Sure... see this: > mysql> SELECT Job.Job AS Job,Job.Name AS JName,Job.FileSetId AS > FileSetId,FileSet.FileSet AS FSName,FileSet.MD5 AS FSMD5,FileSet.CreateTime > AS FSCreated FROM Job,FileSet WHERE Job.FileSetId=FileSet.FileSetId AND > Job.Name="Demo1" GROUP BY FSMD5; > +------------------------------+-------+-----------+----------+------------------------+---------------------+ > | Job | JName | FileSetId | FSName | FSMD5 > | FSCreated | > +------------------------------+-------+-----------+----------+------------------------+---------------------+ > | Demo1.2009-04-29_16.00.00.35 | Demo1 | 9 | Demo1Set | > EG+Gq8+j45+1L7JF7B/EZC | 2009-04-29 11:57:46 | > | Demo1.2009-04-20_22.45.00.08 | Demo1 | 2 | Demo1Set | > hy/ID6/JBj+428d/PVIOlC | 2009-03-19 12:10:46 | > +------------------------------+-------+-----------+----------+------------------------+---------------------+ > 2 rows in set (0.02 sec) You notice I changed the file set once. The FileSetId row is the one you're interested in. You can look up the known IDs in the FileSet Table: > mysql> SELECT * FROM FileSet WHERE FileSet="Demo1Set"; > +-----------+----------+------------------------+---------------------+ > | FileSetId | FileSet | MD5 | CreateTime | > +-----------+----------+------------------------+---------------------+ > | 2 | Demo1Set | hy/ID6/JBj+428d/PVIOlC | 2009-03-19 12:10:46 | > | 9 | Demo1Set | EG+Gq8+j45+1L7JF7B/EZC | 2009-04-29 11:57:46 | > +-----------+----------+------------------------+---------------------+ > 2 rows in set (0.00 sec) These are the two file sets Bacula knows under that name. So it's only looking up the latest jobs(s) using the old file set Id > mysql> SELECT EndTime FROM Job WHERE FileSetId=2 AND Level="F" and > Name="Demo1" ORDER BY EndTime DESC LIMIT 1; > +---------------------+ > | EndTime | > +---------------------+ > | 2009-04-28 22:05:14 | > +---------------------+ > 1 row in set (0.01 sec) and changing those to refer to the new FileSet. Something like 'UPDATE Job SET FileSetId=9 WHERE Name="Demo1" AND EndTime>='2009-04-28 22:05:14'; and Bacula would find previous jobs with the right file set, so no updates are needed. Good enough? Arno -- Arno Lehmann IT-Service Lehmann Sandstr. 6, 49080 Osnabrück www.its-lehmann.de ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users