Hi!
I found a solution to my problem below... I'm posting the solution to the list so it might help others.

Since the problem I had was that the block size settings were different on my new and my old machine I checked the settings on the old machine and used the same settings on the new one.
Simple? Yes, when one knows how to do it... :-)

Using "mt -f /dev/nst0 status" on the old machine, I got the setting for the tape-station (512 in my case)
The command "bls -c /etc/bacula/bacula-sd.conf -k -V \* /dev/nst0" shows me the blocksize used on the tape (64512 for me). I could run this check on the new machine too.

By using Minimum and Maximum block size in bacula-sd.conf I'm forcing bacula to use a fixed block size.
I also set my tape drive on the new machine using "mt -f /dev/nst0 defblksize 512"

I could now use bscan to recreate the database records for my tapes, and then restore them.

Don't forget to change the settings back to variable blocksize when done!
Run "mt -f /dev/nst0 defblksize 0"
And remove the block size directives from bacula-sd.conf

Thank you Kern for a great program and wonderful support!

Best regards, Jonas Mixter



On 2005-11-28 23:31, Kern Sibbald wrote:
On Monday 28 November 2005 17:25, Jonas Mixter wrote:
  
Hi again...
Thanks for your quick answer! I understand the details of my problem
better now...
I do have some more questions though.

    
28-Nov 14:42 bscan: bscan Error: block.c:264 Volume data error at 0:1!
Wanted ID: "BB02", got "". Buffer discarded.

...and then bscan exits.
        
You should try running the btape "test" command.
      
I've tested my drive when installing this new machine, but ran the
command again just to be sure. It says all is OK...

I also ran the command on the old machine and it failed!
I've been using this installation for over a year so I cannot recall if
I ever ran the bscan test when installing (probably not I'm afraid). I
can both backup and restore on the old machine though... (Tried to
restore some files from one of the old tape a few minutes ago, all went
fine.)

    
All the old tapes are written using bacula 1.34.2 (or perhaps an even
older version) and I'm now using 1.36.2 (shipped with Debian).
Is there a difference in the format on the tapes?
        
No, not that I am aware of.  However, Bacula does set your tape drive to
variable block format if that is what your Device statement specifies,
whereas 1.34.2 does not do that.  Depending on how your machine
initializes the tape drive, this could create some incompatibilities ... 
The manual goes into these questions in more detail and suggests some
ways of dealing with it.
      
I read http://bacula.org/rel-manual/Testing_Your_Tape_Drive.html and
wonder if I could see if variable or fixed blocksize were used on the
old machine. 
    

The tape testing manual tells you how to determine that question.  In general 
if you have tapeinfo and mt you should be able to find out, or possibly by 
looking at the output from one of the variations of the bls command.

  
I also wonder if I could specify a fixed blocksize in 
bacula-sd.conf 
    

Yes, of course.

  
to be able to restore from the old tapes. 
    
Who knows? There are so many variables of systems and tape drives and 
options ...



  
I cannot change the bootstrap file as suggested since the volume is not
in the catalog. 
    

A bootstrap file is an ASCII file that anyone can edit. It is not directly 
tied to the catalog.  If you read the restore manual as I suggested, it is 
explained there.

  
I need to use bscan to get it into the catalog first... 
    

That is *one* way of doing things ...

  
Are my old tapes useless or is there any way to use them on the new
machine?
    

I cannot ansswer that. See my answer to the same question above.

  
If it's not possible to read the tapes on the new machine, is it a
workable solution to use bcopy to get the data into a file on the old
machine and then copy it all back to tape on the new machine?
    

Perhaps, but personally, I would restore the files to disk, and move the 
restore directory to the new machine.

  

Reply via email to