Re: [Bacula-users] Bacula restore runs forever - bootstrap creation [solved]

2010-08-05 Thread news . only
Martin Simmons schrieb:

 Ok, that explains the duplicate bootstrap rows.
 
 What is the size of the job in bytes?

exactly 28321715406 B (approx 27 GB)

 Did it complete without errors?

Yes, it did.

 Have you run any tools like bscan with this volume to update the
 catalog?

I did! I still was in the phase of evaluating and I tried a lot of
things. Several older sessions where already purged.

But I can't say for sure WHEN I tried bscan.

 What does the following slightly modified query print for that jobid?
 
 SELECT  VolumeName, MediaType, VolIndex, JobMediaId,
 FirstIndex, LastIndex, StartFile,
 JobMedia.EndFile, StartBlock, JobMedia.EndBlock
 FROMJobMedia, Media
 WHERE   JobMedia.JobId=NNN
 AND JobMedia.MediaId=Media.MediaId
 ORDER BY VolIndex,JobMediaId;

++---+--+++---+---+-++--+
| VolumeName | MediaType | VolIndex | JobMediaId | FirstIndex | LastIndex | 
StartFile | EndFile | StartBlock | EndBlock |
++---+--+++---+---+-++--+
| KYE713L4   | LTO-4 |1 |356 |  1 |101610 | 
  246 | 246 |  0 |77503 |
| KYE713L4   | LTO-4 |2 |357 | 101610 |116651 | 
  247 | 247 |  0 |77503 |
| KYE713L4   | LTO-4 |3 |358 | 116651 |126690 | 
  248 | 248 |  0 |77503 |
| KYE713L4   | LTO-4 |4 |359 | 126690 |151467 | 
  249 | 249 |  0 |77503 |
| KYE713L4   | LTO-4 |5 |360 | 151467 |169844 | 
  250 | 250 |  0 |77503 |
| KYE713L4   | LTO-4 |6 |361 | 169844 |292514 | 
  251 | 251 |  0 |51961 |
| KYE713L4   | LTO-4 |7 |913 |  1 |292514 | 
0 | 251 |  0 |51961 |
++---+--+++---+---+-++--+

Well! Does the big gap in JobMediaId indicate that in fact this session
was bscanned though it wasn't already purged?

I tried this one:

SELECT VolumeName, FirstIndex, JobId, count(*)
FROM  JobMedia, Media
WHERE JobMedia.MediaId=Media.MediaId
GROUP BY VolumeName, FirstIndex, JobId
HAVING count(*)  1;

which gave the following result:
+++---+--+
| VolumeName | FirstIndex | JobId | count(*) |
+++---+--+
| KYE713L4   |  1 |10 |2 |
| KYE713L4   |  1 |13 |2 |
| KYE713L4   |  1 |14 |2 |
| KYE713L4   |  1 |15 |2 |
[...]
| KYE713L4   |  1 |   269 |2 |
| KYE713L4   |  1 |   270 |2 |
| KYE713L4   |  1 |   271 |2 |
| KYE714L4   |  1 |   275 |2 |
| KYE714L4   |  1 |   276 |2 |
| KYE714L4   |  1 |   277 |2 |
[...]
| KYE714L4   |  1 |   361 |2 |
| KYE714L4   |  1 |   362 |2 |
| KYE714L4   |  1 |   363 |2 |
| KYE714L4   |  1 |   364 |2 |
| KYE714L4   |  1 |   368 |2 |
| KYE715L4   |   1357 |   346 |   12 |
| KYE715L4   |   1358 |   346 |5 |
| KYE715L4   |   1767 |   353 |   17 |

When I try your query with one of the JobId between 10 and 368 I always
get something like this:
++---+--+++---+---+-++--+
| VolumeName | MediaType | VolIndex | JobMediaId | FirstIndex | LastIndex | 
StartFile | EndFile | StartBlock | EndBlock |
++---+--+++---+---+-++--+
| KYE714L4   | LTO-4 |1 |738 |  1 | 1 | 
   67 |  67 |  0 | 4982 |
| KYE714L4   | LTO-4 |2 |   1007 |  1 | 1 | 
0 |  67 |  0 | 4982 |
++---+--+++---+---+-++--+

Deleting the extra entries won't be a problem. Thanks a lot for putting
me in the right direction! My problem is solved, but there seems to be
an error somewhere in the bscan routines

IIRC I used
bscan -msS /dev/nst1 -V KYE713L4\|KYE714L4

Greetings,
Michael

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Bacula-users mailing list

Re: [Bacula-users] Bacula restore runs forever - bootstrap creation [solved]

2010-08-05 Thread Martin Simmons
 On Thu, 5 Aug 2010 11:46:27 +0200, news only said:
 
 Martin Simmons schrieb:
 
  What is the size of the job in bytes?
 
 exactly 28321715406 B (approx 27 GB)

OK, that is very close to the total number of 64512 byte blocks recorded in
VolIndex 1 to 6, so I think those rows represent the whole job (nothing
missing or extra).


 ++---+--+++---+---+-++--+
 | VolumeName | MediaType | VolIndex | JobMediaId | FirstIndex | LastIndex | 
 StartFile | EndFile | StartBlock | EndBlock |
 ++---+--+++---+---+-++--+
 | KYE713L4   | LTO-4 |1 |356 |  1 |101610 |   
 246 | 246 |  0 |77503 |
 | KYE713L4   | LTO-4 |2 |357 | 101610 |116651 |   
 247 | 247 |  0 |77503 |
 | KYE713L4   | LTO-4 |3 |358 | 116651 |126690 |   
 248 | 248 |  0 |77503 |
 | KYE713L4   | LTO-4 |4 |359 | 126690 |151467 |   
 249 | 249 |  0 |77503 |
 | KYE713L4   | LTO-4 |5 |360 | 151467 |169844 |   
 250 | 250 |  0 |77503 |
 | KYE713L4   | LTO-4 |6 |361 | 169844 |292514 |   
 251 | 251 |  0 |51961 |
 | KYE713L4   | LTO-4 |7 |913 |  1 |292514 |   
   0 | 251 |  0 |51961 |
 ++---+--+++---+---+-++--+
 
 Well! Does the big gap in JobMediaId indicate that in fact this session
 was bscanned though it wasn't already purged?

Yes, it is very likely.  It looks like bscan creates only one JobMedia record
per job and its StartFile is always 0.


 Deleting the extra entries won't be a problem. Thanks a lot for putting
 me in the right direction! My problem is solved, but there seems to be
 an error somewhere in the bscan routines

Bscan has some limitations, but they are not all documented (or known!).

__Martin

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula restore runs forever - bootstrap creation

2010-08-03 Thread Martin Simmons
 On Sat, 31 Jul 2010 12:01:40 +0200, news only said:
 
 Martin Simmons schrieb:
 
  Michael schrieb:
   So, what might be the cause for the creation of the erroneous
   bootstrap entry (VolAddr=0-1078036843257)?
  
  It could be catalog corruption.
  
  What does the following SQL query return (where NNN is the jobid
  containing that file)?
  
  SELECT  VolumeName, MediaType, FirstIndex, LastIndex, StartFile,
  JobMedia.EndFile, StartBlock, JobMedia.EndBlock,
  Slot, StorageId, InChanger
  FROMJobMedia, Media
  WHERE   JobMedia.JobId=NNN
  AND JobMedia.MediaId=Media.MediaId
  ORDER BY VolIndex,JobMediaId;
  
 
 Thanks for the reply. This is the outout from the query:
 
 ++---++---+---+-++--+--+---+---+
 | VolumeName | MediaType | FirstIndex | LastIndex | StartFile | EndFile | 
 StartBlock | EndBlock | Slot | StorageId | InChanger |
 ++---++---+---+-++--+--+---+---+
 | KYE713L4   | LTO-4 |  1 |101610 |   246 | 246 | 
  0 |77503 |1 | 3 | 1 |
 | KYE713L4   | LTO-4 | 101610 |116651 |   247 | 247 | 
  0 |77503 |1 | 3 | 1 |
 | KYE713L4   | LTO-4 | 116651 |126690 |   248 | 248 | 
  0 |77503 |1 | 3 | 1 |
 | KYE713L4   | LTO-4 | 126690 |151467 |   249 | 249 | 
  0 |77503 |1 | 3 | 1 |
 | KYE713L4   | LTO-4 | 151467 |169844 |   250 | 250 | 
  0 |77503 |1 | 3 | 1 |
 | KYE713L4   | LTO-4 | 169844 |292514 |   251 | 251 | 
  0 |51961 |1 | 3 | 1 |
 | KYE713L4   | LTO-4 |  1 |292514 | 0 | 251 | 
  0 |51961 |1 | 3 | 1 |
 ++---++---+---+-++--+--+---+---+

Ok, that explains the duplicate bootstrap rows.


 I do not understand the reason of the last line. Shouldn't it be
 StartFile 246? But I get similar results for at least another full
 backup (didn't query all of them).

No, I don't think StartFile 246 would be any better.  The last row looks
completely bogus to me -- either it is not needed or it is badly corrupted.

What is the size of the job in bytes?

Did it complete without errors?

Have you run any tools like bscan with this volume to update the catalog?

What does the following slightly modified query print for that jobid?

SELECT  VolumeName, MediaType, VolIndex, JobMediaId,
FirstIndex, LastIndex, StartFile,
JobMedia.EndFile, StartBlock, JobMedia.EndBlock
FROMJobMedia, Media
WHERE   JobMedia.JobId=NNN
AND JobMedia.MediaId=Media.MediaId
ORDER BY VolIndex,JobMediaId;

__Martin

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula restore runs forever - bootstrap creation

2010-07-31 Thread news . only
Martin Simmons schrieb:

 Michael schrieb:
  So, what might be the cause for the creation of the erroneous
  bootstrap entry (VolAddr=0-1078036843257)?
 
 It could be catalog corruption.
 
 What does the following SQL query return (where NNN is the jobid
 containing that file)?
 
 SELECT  VolumeName, MediaType, FirstIndex, LastIndex, StartFile,
 JobMedia.EndFile, StartBlock, JobMedia.EndBlock,
 Slot, StorageId, InChanger
 FROMJobMedia, Media
 WHERE   JobMedia.JobId=NNN
 AND JobMedia.MediaId=Media.MediaId
 ORDER BY VolIndex,JobMediaId;
 

Thanks for the reply. This is the outout from the query:

++---++---+---+-++--+--+---+---+
| VolumeName | MediaType | FirstIndex | LastIndex | StartFile | EndFile | 
StartBlock | EndBlock | Slot | StorageId | InChanger |
++---++---+---+-++--+--+---+---+
| KYE713L4   | LTO-4 |  1 |101610 |   246 | 246 |   
   0 |77503 |1 | 3 | 1 |
| KYE713L4   | LTO-4 | 101610 |116651 |   247 | 247 |   
   0 |77503 |1 | 3 | 1 |
| KYE713L4   | LTO-4 | 116651 |126690 |   248 | 248 |   
   0 |77503 |1 | 3 | 1 |
| KYE713L4   | LTO-4 | 126690 |151467 |   249 | 249 |   
   0 |77503 |1 | 3 | 1 |
| KYE713L4   | LTO-4 | 151467 |169844 |   250 | 250 |   
   0 |77503 |1 | 3 | 1 |
| KYE713L4   | LTO-4 | 169844 |292514 |   251 | 251 |   
   0 |51961 |1 | 3 | 1 |
| KYE713L4   | LTO-4 |  1 |292514 | 0 | 251 |   
   0 |51961 |1 | 3 | 1 |
++---++---+---+-++--+--+---+---+

I do not understand the reason of the last line. Shouldn't it be
StartFile 246? But I get similar results for at least another full
backup (didn't query all of them).
Greetings
Michael

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula restore runs forever - bootstrap creation

2010-07-30 Thread Martin Simmons
 On Fri, 30 Jul 2010 11:06:30 +0200, news only said:
 
 I tried to  restore one single file from a LTO-4 drive installed into
 a Quantum SuperLoader3 changer device.
 
 The file in question was just a small (15 kB) one. It was positioned
 somewhere in the middle of a tape. The tape contained about 200 backup
 sessions in about 280 tape-files. About 150 jobs where already purged,
 the file to be restored was in a session not purged. The tape
 contained approx. 800 GB and was in Error-Condition after a crash
 some time in the past. I use bacula version 5.0.1 with MySQL on SuSE
 Enterprise 9.
 
 When I did the restore I got the following bootstrap-file:
 
 -8--
 
 Storage=SuperLoader3
 Volume=KYE713L4
 MediaType=LTO-4
 Device=LTO-4
 Slot=1
 VolSessionId=129
 VolSessionTime=1275651480
 VolAddr=1060856922112-1060856999615
 FileIndex=111445
 Count=1
 Storage=SuperLoader3
 Volume=KYE713L4
 MediaType=LTO-4
 Device=LTO-4
 Slot=1
 VolSessionId=129
 VolSessionTime=1275651480
 VolAddr=0-1078036843257
 FileIndex=111445
 Count=1
 
 -8--
 
 The restore run forever and I cancelled it.
 
 ...
 
 So, what might be the cause for the creation of the erroneous bootstrap
 entry (VolAddr=0-1078036843257)?

It could be catalog corruption.

What does the following SQL query return (where NNN is the jobid containing
that file)?

SELECT  VolumeName, MediaType, FirstIndex, LastIndex, StartFile,
JobMedia.EndFile, StartBlock, JobMedia.EndBlock,
Slot, StorageId, InChanger
FROMJobMedia, Media
WHERE   JobMedia.JobId=NNN
AND JobMedia.MediaId=Media.MediaId
ORDER BY VolIndex,JobMediaId;

__Martin

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users