Martin Simmons wrote:
>
> >
> > >
> > > >
> > > > >
> > > > > > On Wed, 14 Apr 2010 02:30:15 -0400, ladolf said:
> > > > > >
> > > > >
> > > >
> > >
> >
> >
> > Martin Simmons wrote:
> >
> > >
> > >
> > > >
> > > >
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > > On Tue, 13 Apr 2010 04:08:03 -0400, ladolf said:
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > > I am trying to import tape data to bacula catalog using bscan:
> > > > bscan -b mju3-fd_MJU-TED2.bsr -m -n bacula -u bacula -P bacula -h
> > > > localhost -s -S -v /dev/st0
> > > >
> > > > I got this error:
> > > > bscan: bscan.c:1245 Could not create JobMedia record.
> > > > ERR=sql_create.c:156 Update Media record UPDATE Media SET EndFile=167,
> > > > EndBlock=27602 WHERE MediaId=0 failed: ERR=
> > > >
> > > > This is whole log:
> > > > bacula:~ # bscan -b /root/bacula/mju1-fd_MJU-MES3.bsr -m -n bacula -u
> > > > bacula -P bacula -s -S -v /dev/st0
> > > > bscan: butil.c:282 Using device: "/dev/st0" for reading.
> > > > 13-Apr 08:17 bscan JobId 0: Ready to read from volume "MJU-MES3" on
> > > > device "LTO3Drive" (/dev/st0).
> > > > bscan: bscan.c:297 First Volume Size = 0
> > > > bscan: bscan.c:309 Using Database: bacula, User: bacula
> > > > 13-Apr 08:17 bscan JobId 0: Forward spacing Volume "MJU-MES3" to
> > > > file:block 0:1.
> > > > bscan: bscan.c:521 SOS_LABEL: Found Job record for JobId: 375
> > > > ...
> > > > bscan: bscan.c:689 1,572,864 file records. At file:blk=165:13,267
> > > > bytes=330,660,788,028
> > > > bscan: bscan.c:1037 Fileset "MJU_NSS" already exists.
> > > > bscan: bscan.c:1152 Could not update JobId=328 record.
> > > > ERR=sql_update.c:196 Update failed: affected_rows=0 for UPDATE Job SET
> > > > JobStatus='T',EndTime='2010-03-30
> > > > 05:21: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:21:18',PriorJobId=0 WHERE JobId=328
> > > >
> > > > bscan: bscan.c:1245 Could not create JobMedia record.
> > > > ERR=sql_create.c:156 Update Media record UPDATE Media SET EndFile=167,
> > > > EndBlock=27602 WHERE MediaId=0 failed: ERR=
> > > >
> > > >
> > >
> > > What is in the bsr file? Also, I notice that you have two different bsr
> > > files
> > > in the command lines above. Do you have any bsr files that work?
> > >
> > > BTW, I hope you aren't using /dev/st0 in your bacula-sd.conf -- it should
> > > be
> > > /dev/nst0, otherwise the start of the tape might be overwritten if you run
> > > more than one job.
> > >
> > >
> >
> > Thanks for the notice __Martin. You are right. The first bsr (TED2) is
> > wrong one. But the second one (mju1-fd_MJU-MES3.bsr) should be valid one. I
> > actually have 3 bsr files (3 jobs) for that monthly tape
> > mju1-fd_MJU-MES3.bsr
> > mju2-fd_MJU-MES3.bsr
> > mju3-fd_MJU-MES3.bsr
> > but only first one is important. Should I include all 3 bsr files in one
> > command line?
> >
> > The reason I am trying to get data from this tape is because I installed a
> > new bacula server. Old bacula server was the same version (3.0.2). A new
> > server used LTO-3 drive, a new one has LTO-4. I left section for LTO-3 drive
> > in bacula-sd.conf. I dumped catalog from old server and inported it to new
> > server. Restore from old tape worked.
> > The problem occured because the first time monthly tape should be used on
> > new server, but backup on new server did not start (forgot to add mount to
> > start of the job). Because old server was still running, I have montly
> > backup, which is in catalog on old server, but not in catalog on new
> > server. I would like to import it to new server.
> > I know I could use bextract in case of emergency, but I would still like to
> > import informations about data on monthly tape into new catalog.
> >
>
> The bsr created by a backup might be too restrictive for bscan.
>
> Can you bscan the whole tape by passing the -V VolumeName argument instead of
> using the bsr?
>
>
>
> > Bacula reports that jobs are imported, but volume is not.
> >
> > I am using /dev/st0, not /dev/nst0. Why would be this wrong? I have no
> > problem running more than one job.
> >
>
> The /dev/st0 device usually rewinds the tape every time it is opened, whereas
> the /dev/nst0 device leaves it at the current position. This matters in some
> Bacula confgurations because it can close and reopen the device and expect it
> to remain in the same place. If the tape rewinds, then it will overwrite the
> volume label and existing jobs. Bacula will always rewind the tape itself if
> it needs to.
>
> __Martin
>
> ------------------------------------------------------------------------------
> Download IntelĀ® 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.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
Martin you are the man. Than you very much. It worked without bootstrap with
specified volume name.
bacula:~ # bscan -m -n bacula -u bacula -P bacula -s -S -v -V MJU-MES3
/dev/st0
bscan: butil.c:282 Using device: "/dev/st0" for reading.
15-Apr 08:00 bscan JobId 0: Ready to read from volume "MJU-MES3" on
device "LTO3Drive" (/dev/st0).
bscan: bscan.c:297 First Volume Size = 0
bscan: bscan.c:309 Using Database: bacula, User: bacula
bscan: bscan.c:451 Pool record for MJU-MESECNI found in DB.
bscan: bscan.c:465 Pool type "Backup" is OK.
bscan: bscan.c:949 Created Media record for Volume: MJU-MES3
bscan: bscan.c:493 Media type "LTO-3" is OK.
bscan: bscan.c:503 VOL_LABEL: OK for Volume: MJU-MES3
bscan: bscan.c:521 SOS_LABEL: Found Job record for JobId: 375
bscan: bscan.c:689 32,768 file records. At file:blk=4:10,978
bytes=8,703,061,051
bscan: bscan.c:689 65,536 file records. At file:blk=12:10,007
bytes=24,631,024,504
bscan: bscan.c:689 98,304 file records. At file:blk=17:12,296
bytes=34,772,701,821
bscan: bscan.c:689 131,072 file records. At file:blk=41:17,177
bytes=83,059,132,886
bscan: bscan.c:689 163,840 file records. At file:blk=48:14,540
bytes=96,880,864,444
bscan: bscan.c:689 196,608 file records. At file:blk=56:19,592
bytes=113,197,106,283
bscan: bscan.c:689 229,376 file records. At file:blk=58:27,181
bytes=117,684,093,523
bscan: bscan.c:689 262,144 file records. At file:blk=62:1,354
bytes=124,014,167,373
bscan: bscan.c:689 294,912 file records. At file:blk=70:14,673
bytes=140,863,486,186
bscan: bscan.c:689 327,680 file records. At file:blk=78:10,895
bytes=156,610,411,395
bscan: bscan.c:689 360,448 file records. At file:blk=83:13,104
bytes=166,746,960,779
bscan: bscan.c:689 393,216 file records. At file:blk=86:8,809
bytes=172,466,482,115
bscan: bscan.c:689 425,984 file records. At file:blk=89:11,381
bytes=178,628,819,126
bscan: bscan.c:689 458,752 file records. At file:blk=89:18,176
bytes=179,066,906,879
bscan: bscan.c:689 491,520 file records. At file:blk=92:22,443
bytes=185,338,483,956
bscan: bscan.c:689 524,288 file records. At file:blk=94:28,568
bytes=189,731,077,990
bscan: bscan.c:689 557,056 file records. At file:blk=97:1,878
bytes=194,006,613,756
bscan: bscan.c:689 589,824 file records. At file:blk=98:24,191
bytes=197,444,114,700
bscan: bscan.c:689 622,592 file records. At file:blk=101:1,503
bytes=201,977,734,504
bscan: bscan.c:689 655,360 file records. At file:blk=103:5,551
bytes=206,236,416,311
bscan: bscan.c:689 688,128 file records. At file:blk=105:20,407
bytes=211,191,859,732
bscan: bscan.c:689 720,896 file records. At file:blk=107:11,985
bytes=214,646,482,899
bscan: bscan.c:689 753,664 file records. At file:blk=109:4,482
bytes=218,160,362,222
bscan: bscan.c:689 786,432 file records. At file:blk=111:11,846
bytes=222,632,833,079
bscan: bscan.c:689 819,200 file records. At file:blk=113:16,598
bytes=226,936,844,498
bscan: bscan.c:689 851,968 file records. At file:blk=114:30,066
bytes=229,804,061,984
bscan: bscan.c:689 884,736 file records. At file:blk=116:23,355
bytes=233,368,979,739
bscan: bscan.c:689 917,504 file records. At file:blk=118:21,228
bytes=237,229,506,388
bscan: bscan.c:689 950,272 file records. At file:blk=120:10,759
bytes=240,552,144,588
bscan: bscan.c:689 983,040 file records. At file:blk=122:7,032
bytes=244,309,483,708
bscan: bscan.c:689 1,015,808 file records. At file:blk=125:175
bytes=249,863,830,608
bscan: bscan.c:689 1,048,576 file records. At
file:blk=127:3,697 bytes=254,088,554,605
bscan: bscan.c:689 1,081,344 file records. At
file:blk=129:1,135 bytes=257,921,027,684
bscan: bscan.c:689 1,114,112 file records. At
file:blk=131:13,974 bytes=262,746,474,845
bscan: bscan.c:689 1,146,880 file records. At
file:blk=133:9,000 bytes=266,423,396,078
bscan: bscan.c:689 1,179,648 file records. At
file:blk=134:26,385 bytes=269,543,135,181
bscan: bscan.c:689 1,212,416 file records. At
file:blk=137:6,189 bytes=274,237,434,348
bscan: bscan.c:689 1,245,184 file records. At
file:blk=140:2,814 bytes=280,016,262,795
bscan: bscan.c:689 1,277,952 file records. At
file:blk=142:23,266 bytes=285,332,608,122
bscan: bscan.c:689 1,310,720 file records. At file:blk=151:193
bytes=301,834,299,444
bscan: bscan.c:689 1,343,488 file records. At
file:blk=152:6,006 bytes=304,207,955,949
bscan: bscan.c:689 1,376,256 file records. At
file:blk=155:2,927 bytes=310,005,898,602
bscan: bscan.c:689 1,409,024 file records. At
file:blk=156:24,495 bytes=313,395,284,202
bscan: bscan.c:689 1,441,792 file records. At
file:blk=157:16,031 bytes=314,848,411,398
bscan: bscan.c:689 1,474,560 file records. At
file:blk=158:13,330 bytes=316,673,068,788
bscan: bscan.c:689 1,507,328 file records. At
file:blk=159:10,262 bytes=318,474,063,228
bscan: bscan.c:689 1,540,096 file records. At
file:blk=164:27,701 bytes=329,592,591,048
bscan: bscan.c:689 1,572,864 file records. At
file:blk=165:13,267 bytes=330,660,788,028
bscan: bscan.c:1037 Fileset "MJU_NSS" already exists.
bscan: bscan.c:1152 Could not update JobId=328 record.
ERR=sql_update.c:196 Update failed: affected_rows=0 for UPDATE Job SET
JobStatus='T',EndTime='2010-03-30
05:21:18',ClientId=2,JobBytes=335474793333,ReadBytes=0,JobFiles=1594852,JobErrors=0,VolSessionId=43,VolSessionTime=1268211453,PoolId=5,FileSetId=9,JobTDate=1269919278,RealEndTime='2010-03-30
05:21:18',PriorJobId=0 WHERE JobId=328
bscan: bscan.c:1250 Created JobMedia record JobId 328, MediaId 54
bscan: bscan.c:521 SOS_LABEL: Found Job record for JobId: 376
bscan: bscan.c:689 1,605,632 file records. At file:blk=168:690
bytes=335,627,184,186
bscan: bscan.c:689 1,638,400 file records. At
file:blk=172:17,926 bytes=344,733,785,895
bscan: bscan.c:689 1,671,168 file records. At
file:blk=177:28,239 bytes=355,392,790,406
bscan: bscan.c:689 1,703,936 file records. At
file:blk=178:10,198 bytes=356,228,461,058
bscan: bscan.c:1037 Fileset "MJU_NSS" already exists.
bscan: bscan.c:1152 Could not update JobId=329 record.
ERR=sql_update.c:196 Update failed: affected_rows=0 for UPDATE Job SET
JobStatus='T',EndTime='2010-03-30
05:40:15',ClientId=3,JobBytes=20946594494,ReadBytes=0,JobFiles=110798,JobErrors=0,VolSessionId=44,VolSessionTime=1268211453,PoolId=5,FileSetId=9,JobTDate=1269920415,RealEndTime='2010-03-30
05:40:15',PriorJobId=0 WHERE JobId=329
bscan: bscan.c:1250 Created JobMedia record JobId 329, MediaId 54
bscan: bscan.c:1020 Created Client record for Client: mju3-fd
bscan: bscan.c:1103 Created new JobId=386 record for original JobId=330
bscan: bscan.c:1037 Fileset "BaculaServerFileSet" already exists.
bscan: bscan.c:1158 Updated Job termination record for JobId=386
Level=Full TermStat=T
bscan: bscan.c:1250 Created JobMedia record JobId 386, MediaId 54
15-Apr 09:30 bscan JobId 0: End of Volume at file 181 on device
"LTO3Drive" (/dev/st0), Volume "MJU-MES3"
bscan: bscan.c:338-386 ========== JobId=0 ========
bscan: bscan.c:970 Updated Media record at end of Volume: MJU-MES3
bscan: bscan.c:371 First Volume Size = 0
15-Apr 09:30 bscan JobId 0: End of all volumes.
bscan: bscan.c:970 Updated Media record at end of Volume: MJU-MES3
bscan: bscan.c:638 End of all Volumes. VolFiles=181 VolBlocks=0
VolBytes=358,765,058,045
Records added or updated in the catalog:
1 Media
1 Pool
3 Job
1711598 File
I tried with /dev/st0, because /dev/nst0 was not in bacula-sd.conf. I will also
try to change that, but my problem is solved now.
bscan -m -n bacula -u bacula -P bacula -s -S -v -V MJU-MES3 /dev/nst0
bscan: butil.c:278 Could not find device "/dev/nst0" in config file
bacula-sd.conf.
15-Apr 08:00 bscan JobId 0: Fatal error: butil.c:168 Cannot
find device "/dev/nst0" in config file bacula-sd.conf.
+----------------------------------------------------------------------
|This was sent by lado.lan...@gmail.com via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+----------------------------------------------------------------------
------------------------------------------------------------------------------
Download Intel® 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users