Bacula-users

[Bacula-users] Could not create JobMedia record

2010-04-13 04:10:23
Subject: [Bacula-users] Could not create JobMedia record
From: ladolf <bacula-forum AT backupcentral DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 13 Apr 2010 04:08:03 -0400
I am trying to import tape data to bacula catalog using bscan:
bscan ?b mju3-fd_MJU-TED2.bsr ?m ?n bacula ?u bacula&nbsp; -P bacula ?h 
localhost ?s ?S ?v /dev/st0

I got this error:
bscan&#58; bscan.c&#58;1245 Could not create JobMedia record. 
ERR=sql_create.c&#58;156 Update Media record UPDATE Media SET EndFile=167, 
EndBlock=27602 WHERE MediaId=0 failed&#58; ERR=

This is whole log:
bacula&#58;~ # bscan -b /root/bacula/mju1-fd_MJU-MES3.bsr -m -n bacula -u 
bacula -P bacula -s -S -v /dev/st0
bscan&#58; butil.c&#58;282 Using device&#58; "/dev/st0" for reading.
13-Apr 08&#58;17 bscan JobId 0&#58; Ready to read from volume "MJU-MES3" on 
device "LTO3Drive" &#40;/dev/st0&#41;.
bscan&#58; bscan.c&#58;297 First Volume Size = 0
bscan&#58; bscan.c&#58;309 Using Database&#58; bacula, User&#58; bacula
13-Apr 08&#58;17 bscan JobId 0&#58; Forward spacing Volume "MJU-MES3" to 
file&#58;block 0&#58;1.
bscan&#58; bscan.c&#58;521 SOS_LABEL&#58; Found Job record for JobId&#58; 375
bscan&#58; bscan.c&#58;689 32,768 file records. At file&#58;blk=4&#58;10,978 
bytes=8,703,061,051
bscan&#58; bscan.c&#58;689 65,536 file records. At file&#58;blk=12&#58;10,007 
bytes=24,631,024,504
bscan&#58; bscan.c&#58;689 98,304 file records. At file&#58;blk=17&#58;12,296 
bytes=34,772,701,821
bscan&#58; bscan.c&#58;689 131,072 file records. At file&#58;blk=41&#58;17,177 
bytes=83,059,132,886
bscan&#58; bscan.c&#58;689 163,840 file records. At file&#58;blk=48&#58;14,540 
bytes=96,880,864,444
bscan&#58; bscan.c&#58;689 196,608 file records. At file&#58;blk=56&#58;19,592 
bytes=113,197,106,283
bscan&#58; bscan.c&#58;689 229,376 file records. At file&#58;blk=58&#58;27,181 
bytes=117,684,093,523
bscan&#58; bscan.c&#58;689 262,144 file records. At file&#58;blk=62&#58;1,354 
bytes=124,014,167,373
bscan&#58; bscan.c&#58;689 294,912 file records. At file&#58;blk=70&#58;14,673 
bytes=140,863,486,186
bscan&#58; bscan.c&#58;689 327,680 file records. At file&#58;blk=78&#58;10,895 
bytes=156,610,411,395
bscan&#58; bscan.c&#58;689 360,448 file records. At file&#58;blk=83&#58;13,104 
bytes=166,746,960,779
bscan&#58; bscan.c&#58;689 393,216 file records. At file&#58;blk=86&#58;8,809 
bytes=172,466,482,115
bscan&#58; bscan.c&#58;689 425,984 file records. At file&#58;blk=89&#58;11,381 
bytes=178,628,819,126
bscan&#58; bscan.c&#58;689 458,752 file records. At file&#58;blk=89&#58;18,176 
bytes=179,066,906,879
bscan&#58; bscan.c&#58;689 491,520 file records. At file&#58;blk=92&#58;22,443 
bytes=185,338,483,956
bscan&#58; bscan.c&#58;689 524,288 file records. At file&#58;blk=94&#58;28,568 
bytes=189,731,077,990
bscan&#58; bscan.c&#58;689 557,056 file records. At file&#58;blk=97&#58;1,878 
bytes=194,006,613,756
bscan&#58; bscan.c&#58;689 589,824 file records. At file&#58;blk=98&#58;24,191 
bytes=197,444,114,700
bscan&#58; bscan.c&#58;689 622,592 file records. At file&#58;blk=101&#58;1,503 
bytes=201,977,734,504
bscan&#58; bscan.c&#58;689 655,360 file records. At file&#58;blk=103&#58;5,551 
bytes=206,236,416,311
bscan&#58; bscan.c&#58;689 688,128 file records. At file&#58;blk=105&#58;20,407 
bytes=211,191,859,732
bscan&#58; bscan.c&#58;689 720,896 file records. At file&#58;blk=107&#58;11,985 
bytes=214,646,482,899
bscan&#58; bscan.c&#58;689 753,664 file records. At file&#58;blk=109&#58;4,482 
bytes=218,160,362,222
bscan&#58; bscan.c&#58;689 786,432 file records. At file&#58;blk=111&#58;11,846 
bytes=222,632,833,079
bscan&#58; bscan.c&#58;689 819,200 file records. At file&#58;blk=113&#58;16,598 
bytes=226,936,844,498
bscan&#58; bscan.c&#58;689 851,968 file records. At file&#58;blk=114&#58;30,066 
bytes=229,804,061,984
bscan&#58; bscan.c&#58;689 884,736 file records. At file&#58;blk=116&#58;23,355 
bytes=233,368,979,739
bscan&#58; bscan.c&#58;689 917,504 file records. At file&#58;blk=118&#58;21,228 
bytes=237,229,506,388
bscan&#58; bscan.c&#58;689 950,272 file records. At file&#58;blk=120&#58;10,759 
bytes=240,552,144,588
bscan&#58; bscan.c&#58;689 983,040 file records. At file&#58;blk=122&#58;7,032 
bytes=244,309,483,708
bscan&#58; bscan.c&#58;689 1,015,808 file records. At file&#58;blk=125&#58;175 
bytes=249,863,830,608
bscan&#58; bscan.c&#58;689 1,048,576 file records. At 
file&#58;blk=127&#58;3,697 bytes=254,088,554,605
bscan&#58; bscan.c&#58;689 1,081,344 file records. At 
file&#58;blk=129&#58;1,135 bytes=257,921,027,684
bscan&#58; bscan.c&#58;689 1,114,112 file records. At 
file&#58;blk=131&#58;13,974 bytes=262,746,474,845
bscan&#58; bscan.c&#58;689 1,146,880 file records. At 
file&#58;blk=133&#58;9,000 bytes=266,423,396,078
bscan&#58; bscan.c&#58;689 1,179,648 file records. At 
file&#58;blk=134&#58;26,385 bytes=269,543,135,181
bscan&#58; bscan.c&#58;689 1,212,416 file records. At 
file&#58;blk=137&#58;6,189 bytes=274,237,434,348
bscan&#58; bscan.c&#58;689 1,245,184 file records. At 
file&#58;blk=140&#58;2,814 bytes=280,016,262,795
bscan&#58; bscan.c&#58;689 1,277,952 file records. At 
file&#58;blk=142&#58;23,266 bytes=285,332,608,122
bscan&#58; bscan.c&#58;689 1,310,720 file records. At file&#58;blk=151&#58;193 
bytes=301,834,299,444
bscan&#58; bscan.c&#58;689 1,343,488 file records. At 
file&#58;blk=152&#58;6,006 bytes=304,207,955,949
bscan&#58; bscan.c&#58;689 1,376,256 file records. At 
file&#58;blk=155&#58;2,927 bytes=310,005,898,602
bscan&#58; bscan.c&#58;689 1,409,024 file records. At 
file&#58;blk=156&#58;24,495 bytes=313,395,284,202
bscan&#58; bscan.c&#58;689 1,441,792 file records. At 
file&#58;blk=157&#58;16,031 bytes=314,848,411,398
bscan&#58; bscan.c&#58;689 1,474,560 file records. At 
file&#58;blk=158&#58;13,330 bytes=316,673,068,788
bscan&#58; bscan.c&#58;689 1,507,328 file records. At 
file&#58;blk=159&#58;10,262 bytes=318,474,063,228
bscan&#58; bscan.c&#58;689 1,540,096 file records. At 
file&#58;blk=164&#58;27,701 bytes=329,592,591,048
bscan&#58; bscan.c&#58;689 1,572,864 file records. At 
file&#58;blk=165&#58;13,267 bytes=330,660,788,028
bscan&#58; bscan.c&#58;1037 Fileset "MJU_NSS" already exists.
bscan&#58; bscan.c&#58;1152 Could not update JobId=328 record. 
ERR=sql_update.c&#58;196 Update failed&#58; affected_rows=0 for UPDATE Job SET 
JobStatus='T',EndTime='2010-03-30 
05&#58;21&#58;18',ClientId=2,JobBytes=335474793333,ReadBytes=0,JobFiles=1594852,JobErrors=0,VolSessionId=43,VolSessionTime=1268211453,PoolId=0,FileSetId=9,JobTDate=1269919278,RealEndTime='2010-03-30
 05&#58;21&#58;18',PriorJobId=0 WHERE JobId=328

bscan&#58; bscan.c&#58;1245 Could not create JobMedia record. 
ERR=sql_create.c&#58;156 Update Media record UPDATE Media SET EndFile=167, 
EndBlock=27602 WHERE MediaId=0 failed&#58; ERR=

bscan&#58; bscan.c&#58;521 SOS_LABEL&#58; Found Job record for JobId&#58; 376
Records added or updated in the catalog&#58;
&nbsp; &nbsp; &nbsp; 0 Media
&nbsp; &nbsp; &nbsp; 0 Pool
&nbsp; &nbsp; &nbsp; 2 Job
1594852 File

Media was not imported into catalog so I cannot make restore from that tape.

What did I do wrong? I am using bacula version 3.0.2.

+----------------------------------------------------------------------
|This was sent by lado.langof AT gmail DOT com via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------



------------------------------------------------------------------------------
Download Intel&#174; 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 AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>