-------- Original-Nachricht --------
Betreff: Re: [Bacula-users] How to read a writeprotected Tape ?
Datum: Fri, 22 Apr 2005 09:33:18 +0200
Von: Marc Brueckner <[EMAIL PROTECTED]>
An: Kern Sibbald <[EMAIL PROTECTED]>
Referenzen: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Kern Sibbald schrieb:
Hello,
On Thursday 21 April 2005 17:04, Marc Brueckner wrote:
Hi there,
I am running Bacula in a productive environment for almost two year now and I am totally happy with it.
Now I have a little problem an perhaps one of you can help me.
(For now this is a hypothetical question.) I need to restore a backup from a write protected tape. Bacula won't mount a write protected tape. bextract or bscan neither.
"So switch off the write protect of your tape !" some one would say.
The answer is " I can't" because the hardware protects the tape from being written. The tape was written by a DLT VS80 Streamer, now I ve upgraded to a DLT VS160. If I insert a VS80 written tape its automaticly read-only. So if my VS80 streamer dies on day I have no chance to read the tapes by Bacula.
I already tryed to dd if=/dev/st0 of=/tmp/tape.dump and tryed to bextract from the filedevice.
btape then is able to read the label but bextract terminates with errors.
Backup:/etc/bacula # bextract /tmp/ISLBHV_Woche_0 /restore bextract: butil.c:151 Using device: /tmp for reading. bextract: Ready to read from volume "ISLBHV_Woche_0" on device /tmp. bextract: bextract Error: block.c:248 Expected block-id BB01 or BB02, got . Buffer discarded. bextract: bextract Error: block.c:248 Expected block-id BB01 or BB02, got . Buffer discarded. bextract: bextract Error: Read error on Record Header /tmp: Success 0 files restored.
I would be happy to have a solution because if my VS80 dies I will need it.
I haven't tried it, but I suspect the solution is to modify your Device resource and set "Always Open = no", then run a restore. When the restore runs, it should open the drive as read-only. When you have "Always Open = yes", Bacula must open the drive read-write because it cannot know in advance if you are going to do read or write operations.
If the above works, please let me know, and I will document it.
Hi Kern , you are my Hero ;-)
The restore worked with both options. I set "Always Open=no" => it worked. I set "Always Open=yes" => it worked.
The only really (really really ) stupid thing I've done was that I alway tried to mount the tape before restoring.
The restore worked ,but what if the alle the record in the database were purged one day ?
Does Bscan need to open the drive in RW mode ?
Backup:/etc/bacula # bscan -v -V ISLBHV_Woche_0 /dev/nst0
bscan: butil.c:151 Using device: /dev/nst0 for reading.
bscan: Fatal Error at dev.c:267 because:
dev.c:261 stored: unable to open device /dev/nst0: ERR=Read-only file system
bscan: Fatal Error at device.c:275 because:
dev open failed: dev.c:261 stored: unable to open device /dev/nst0: ERR=Read-only file system
Thank you for your help.
Greetings Marc
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users