On Wednesday 11 May 2005 07:52, Harondel J. Sibble wrote:
> On 21 Apr 2005 at 22:56, Kern Sibbald wrote:
> > > (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.
> >
> > 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.
>
> Well, I am in the position that I need to restore from a write protected
> tape (DDS4). The tape is in a remote office location and no-one is able to
> go onsite until next week, however we need to recover a few files from the
> tape for someone working remotely (out of the country), asap.
>
> # rpm -qa | grep bacula
> bacula-sqlite-1.36.2-1
>
> I do already have Always Open = no defined, yet, bextract and bscan, both
> still barf with an error about Read-only filesystem.
>
> It's been about 2 weeks so the tape data has been purged from the catalog
> database. It was last written to on April 28.
>
> # bscan -V Wednesday -v -s -m -c bacula-sd.conf /dev/nst0
> bscan: butil.c:258 Using device: "/dev/nst0" for reading.
> 10-May 22:47 bscan: Fatal Error at dev.c:295 because:
> dev.c:289 stored: unable to open device /dev/nst0: ERR=Read-only file
> system 10-May 22:47 bscan: Fatal Error at device.c:288 because:
> dev open failed: dev.c:289 stored: unable to open device /dev/nst0:
> ERR=Read- only file system
> 10-May 22:47 bscan: bscan Fatal error: butil.c:167 Cannot open /dev/nst0
>
>
> # bextract -i chris.files -vv -V Wednesday /dev/nst0 /tmp/bacula-restore
> bextract: butil.c:258 Using device: "/dev/nst0" for reading.
> 10-May 22:48 bextract: Fatal Error at dev.c:295 because:
> dev.c:289 stored: unable to open device /dev/nst0: ERR=Read-only file
> system 10-May 22:48 bextract: Fatal Error at device.c:288 because:
> dev open failed: dev.c:289 stored: unable to open device /dev/nst0:
> ERR=Read- only file system
> 10-May 22:48 bextract: bextract Fatal error: butil.c:167 Cannot open
> /dev/nst0
>
> My device definition in bacula-sd.conf is
>
> Device {
>   Name = DDS-4                        #
>   Media Type = DDS-4
>   Archive Device = /dev/nst0
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = no;
>   RemovableMedia = yes;
>   RandomAccess = no;
> ## Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
> ## Changer Device = /dev/sg0
> ## AutoChanger = yes
>  Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
> }
>
>
> Any further suggestions

Try loading version 1.37. I believe this problem is fixed -- though I cannot 
guarantee it.

For doing a bextract with 1.37 there should be no problems.  However, to do a 
bscan, you will need a 1.37 database.  Probably the simplest is to copy your 
existing database, upgrade it to version 1.37, then run bscan and restore 
your files, then if you do not want to continue running 1.37, put back you 
old database, and immediately do a backup of the files with 1.36.

If 1.37 cannot read read-only tapes, then let me know and I'll fix it, but be 
aware I am out of town until Friday.

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to