Folks,
I want to re-create database (catalog) records for a volume. I ran bcsan
without update options to see what it would do. When I run bscan it seems that
it always uses jobid 0 instead of using the jobid found on the tape. It
complains about not finding record for jobid 0.
I am running bacula 2.4.3.
# bscan -c /usr/local/etc/bacula-sd.conf -v -V FullBackup-2009-05-01 /dev/nst0
bscan: butil.c:282 Using device: "/dev/nst0" for reading.
06-Jan 14:44 bscan JobId 0: Ready to read from volume "FullBackup-2009-05-01"
on device "Drive-1" (/dev/nst0).
bscan: bscan.c:293 Using Database: bacula, User: bacula
bscan: bscan.c:436 Pool record for FullBackupTapePool found in DB.
bscan: bscan.c:450 Pool type "Backup" is OK.
bscan: bscan.c:460 Media record for FullBackup-2009-05-01 found in DB.
bscan: bscan.c:478 Media type "Tape:HP-920" is OK.
bscan: bscan.c:488 VOL_LABEL: OK for Volume: FullBackup-2009-05-01
bscan: bscan.c:512 SOS_LABEL: Job record not found for JobId: 0
06-Jan 14:44 bscan JobId 0: End of file 1 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
bscan: bscan.c:688 32,768 file records. At file:blk=1:24,680 bytes=1,591,330,278
06-Jan 14:44 bscan JobId 0: End of file 2 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
06-Jan 14:44 bscan JobId 0: End of file 3 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
06-Jan 14:44 bscan JobId 0: End of file 4 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
bscan: bscan.c:688 65,536 file records. At file:blk=4:62,825 bytes=4,050,727,725
bscan: bscan.c:512 SOS_LABEL: Job record not found for JobId: 0
06-Jan 14:45 bscan JobId 0: End of file 5 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
bscan: bscan.c:688 98,304 file records. At file:blk=5:14,270 bytes=5,899,744,842
06-Jan 14:45 bscan JobId 0: End of file 6 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
.
.
.
.
.
.
06-Jan 16:43 bscan JobId 0: End of file 592 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
06-Jan 16:43 bscan JobId 0: End of file 593 on device "Drive-1" (/dev/nst0),
Volume "FullBackup-2009-05-01"
06-Jan 16:43 bscan JobId 0: End of Volume at file 593 on device "Drive-1"
(/dev/nst0), Volume "FullBackup-2009-05-01"
bscan: bscan.c:323-0 ========== JobId=0 ========
06-Jan 16:43 bscan JobId 0: End of all volumes.
bscan: bscan.c:637 End of all Volumes. VolFiles=593 VolBlocks=0
VolBytes=590,918,593,361
Records would have been added or updated in the catalog:
1 Media
1 Pool
26 Job
11009284 File
If I run bscan with more verbose option (-v -v) I can see that it finds jobid
on the tape.
# bscan -c /usr/local/etc/bacula-sd.conf -v -v -V FullBackup-2009-05-01
/dev/nst0
bscan: butil.c:282 Using device: "/dev/nst0" for reading.
06-Jan 16:54 bscan JobId 0: Ready to read from volume "FullBackup-2009-05-01"
on device "Drive-1" (/dev/nst0).
bscan: bscan.c:293 Using Database: bacula, User: bacula
Volume Label:
Id : Bacula 1.0 immortal
VerNo : 11
VolName : FullBackup-2009-05-01
PrevVolName :
VolFile : 0
LabelType : VOL_LABEL
LabelSize : 189
PoolName : FullBackupTapePool
MediaType : Tape:HP-920
PoolType : Backup
HostName : lidp11
Date label written: 01-May-2009 20:10
bscan: bscan.c:436 Pool record for FullBackupTapePool found in DB.
bscan: bscan.c:450 Pool type "Backup" is OK.
bscan: bscan.c:460 Media record for FullBackup-2009-05-01 found in DB.
bscan: bscan.c:478 Media type "Tape:HP-920" is OK.
bscan: bscan.c:488 VOL_LABEL: OK for Volume: FullBackup-2009-05-01
Begin Job Session Record:
JobId : 10038
VerNum : 11
PoolName : FullBackupTapePool
PoolType : Backup
JobName : lidp7-FullBackupToTape
ClientName : lidp7-fd
Job (unique name) : lidp7-FullBackupToTape.2009-05-01_20.00.15
FileSet : lidp7 Tape set
JobType : B
JobLevel : F
Date written : 01-May-2009 20:10
bscan: bscan.c:512 SOS_LABEL: Job record not found for JobId: 0
I am afraid that when I run bscan with update options (-s -m) it will add
everything to jobid 0. There are many jobs (22 I think) on this tape.
Is bscan reporting wrong jobid in the output?
Will it update database with correct jobid?
Thanks.
Hemant Shah
E-mail: hjrrs AT yahoo DOT com
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|