On Tuesday 06 March 2007 22:01, Paul England wrote: > Hi there, > > Yesterday I run bscan to update my bacula catalog database, > > The reason I did this was due to a configuration error on my behalf, > even though my pool was set to 'AutoPrune = no', 'Volume Retention = > 99y' and 'Recycle = no'... the client directive was set to 'AutoPrune = > yes' and 'File Retention = 60d'. > > Because of this it seems that Bacula was pruning files from this job, > when I went to restore files it wouldn't only show me about 10% of them. > > So I tried using bscan with the following parameters... > > bscan -s -m -c bacula-sd.conf -v -V Archive-1\|Archive-2\|Archive-3\| > Archive-4\|Archive-5\|Archive-6\|Archive-7\|Archive-8 /dev/nst0 > > It took more than a day but after wards it said it had added 255000 > records to my database (which sounds about right). > > Now it just doesn't want to work, when I try to restore it tells me that > there is no full backup available. > > Any ideas?
Any answers on this? I run Bacula 2.2.6 dir and sd on FreeBSD-6.3 and want to restore some files from an old volume via bconsole, but there seem to be something missing in database. I tested with SQL-queries taken from Bat: ===== SELECT DISTINCT Job.Jobid AS Id, Job.Name AS JobName, Client.Name AS Client, Job.Starttime AS JobStart, Job.Type AS JobType, Job.Level AS BackupLevel, Job.Jobfiles AS FileCount, Job.JobBytes AS Bytes, Job.JobStatus AS Status, Status.JobStatusLong AS StatusLong, Job.PurgedFiles AS Purged, FileSet.FileSet FROM Job JOIN Client ON (Client.ClientId=Job.ClientId) JOIN Status ON (Job.JobStatus=Status.JobStatus) LEFT OUTER JOIN FileSet ON (FileSet.FileSetId=Job.FileSetId) LEFT OUTER JOIN JobMedia ON (JobMedia.JobId=Job.JobId) LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId) WHERE Media.VolumeName='ultrasoft-s2-full-0001' ORDER BY Job.Starttime DESC, Job.JobId DESC ===== This returned empty set, so I guess bscan isn't updating all the necessary tables? bscan output: ===== # bscan -c /usr/local/etc/bacula-sd.conf -v -V ultrasoft-s2-full-0001 -h localhost -P baculapasswd m -s /backup/bacula/ultrasoft-s2 bscan: butil.c:282 Using device: "/backup/bacula/ultrasoft-s2" for reading. 19-Dec 10:20 bscan JobId 0: Ready to read from volume "ultrasoft-s2-full-0001" on device "device-ultrasoft-s2" (/backup/bacula/ultrasoft-s2). bscan: bscan.c:288 Using Database: bacula, User: bacula bscan: bscan.c:431 Pool record for pool-ultrasoft-s2-full found in DB. bscan: bscan.c:445 Pool type "Backup" is OK. bscan: bscan.c:455 Media record for ultrasoft-s2-full-0001 found in DB. bscan: bscan.c:473 Media type "files-varukas" is OK. bscan: bscan.c:483 VOL_LABEL: OK for Volume: ultrasoft-s2-full-0001 bscan: bscan.c:501 SOS_LABEL: Found Job record for JobId: 7796 bscan: bscan.c:683 32,768 file records. At file:blk=1:104,701 bytes=6,750,689,534 bscan: bscan.c:683 65,536 file records. At file:blk=1:106,565 bytes=6,870,863,970 bscan: bscan.c:683 98,304 file records. At file:blk=1:108,570 bytes=7,000,108,099 bscan: bscan.c:683 131,072 file records. At file:blk=2:144,874 bytes=9,340,856,777 bscan: bscan.c:683 163,840 file records. At file:blk=2:176,914 bytes=11,406,665,320 bscan: bscan.c:683 196,608 file records. At file:blk=2:194,509 bytes=12,541,106,404 bscan: bscan.c:995 Fileset "ultrasoft-s2" already exists. bscan: bscan.c:1116 Updated Job termination record for JobId=7796 Level=Full TermStat=T bscan: bscan.c:1205 Created JobMedia record JobId 7796, MediaId 1376 19-Dec 10:34 bscan JobId 0: End of file 3 on device "device-ultrasoft-s2" (/backup/bacula/ultrasoft-s2), Volume "ultrasoft-s2-full-0001" 19-Dec 10:34 bscan JobId 0: End of Volume at file 3 on device "device-ultrasoft-s2" (/backup/bacula/ultrasoft-s2), Volume "ultrasoft-s2-full-0001" bscan: bscan.c:318-0 ========== JobId=0 ======== bscan: bscan.c:937 Updated Media record at end of Volume: ultrasoft-s2-full-0001 19-Dec 10:34 bscan JobId 0: End of all volumes. bscan: bscan.c:937 Updated Media record at end of Volume: ultrasoft-s2-full-0001 bscan: bscan.c:632 End of all Volumes. VolFiles=3 VolBlocks=0 VolBytes=13,013,043,636 Records added or updated in the catalog: 1 Media 1 Pool 1 Job 204810 File ===== -- Silver ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users