On 11/02/11 11:11, Martin Simmons wrote: > Is it specific to 5.0.3 jobs that you reinserted using bscan? E.g. does it > happen if you delete a 5.2.1 job and bscan it or if you restore from a 5.0.3 > job that was inserted by bacula-dir (if you have any).
Just completed retest of this. Dropped the entire DB and rebuilt it with bscan. Same results as before: the DB contains over 40 jobs for this client, but a full restore attempt sees only jobs 168, 173, 178. However, I've also identified the problem. Bscan is failing badly. It is associating the bscanned jobs with the wrong fileset. My dir.conf file actually references 13 Filesets, four of which have been actually used since upgrading to 5.2.1 and actually have current Fileset IDs after bscanning: mysql> select FileSetId, FileSet, CreateTime from FileSet; +-----------+-------------------+---------------------+ | FileSetId | FileSet | CreateTime | +-----------+-------------------+---------------------+ | 1 | Babylon4 Full Set | 2011-11-03 08:32:44 | | 2 | Catalog Snapshot | 2011-11-03 08:32:44 | | 3 | OpenBSD Full Set | 2011-11-03 10:44:15 | | 4 | Gentoo Full Set | 2011-11-03 11:02:25 | +-----------+-------------------+---------------------+ 4 rows in set (0.00 sec) I currently have 7 clients defined, plus the ALL dummy client for ... restores, if I recall correctly: mysql> select ClientId, Name from Client; +----------+----------------+ | ClientId | Name | +----------+----------------+ | 1 | babylon5 | | 2 | spikyfishthing | | 3 | babylon4 | | 4 | epsilon3 | | 5 | lake | | 6 | vorlon | | 7 | zocalo | | 8 | ALL | +----------+----------------+ 8 rows in set (0.00 sec) The fileset Gentoo Full Set is associated with the client babylon5. All backup jobs for that Client, and ONLY for that client, were made using that fileset. How many Jobs are in the catalog for client babylon5? mysql> SELECT count(JobId) FROM Job where Clientid = 1; +--------------+ | count(JobId) | +--------------+ | 46 | +--------------+ 1 row in set (0.00 sec) What FileSets are they NOW associated with? mysql> SELECT count(Job.JobId), FileSet.FileSet FROM Job JOIN FileSet ON Job.FileSetId = FileSet.FileSetId WHERE ClientId = 1 GROUP BY Job.FileSetId; +------------------+-------------------+ | count(Job.JobId) | FileSet | +------------------+-------------------+ | 2 | Babylon4 Full Set | | 37 | OpenBSD Full Set | | 7 | Gentoo Full Set | +------------------+-------------------+ 3 rows in set (0.07 sec) "Houston, we have a problem." -- 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, SQL wrangler, Free Stater It's not the years, it's the mileage. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel