bacula bscan access remote tape drive

Hi There

I want to re-catalog a tape that's been accidentally deleted from the bacula database (Postgres), however the tape hasn't been overwritten. I've looked at the problem at it seems as though I should use bacula's bscan utility.

I've got a bacula 5.2.10 director (bacula-dir) running under RedHat Linux 5.8 on one server - let's call this serverA and the bacula-sd running on another server -- let's call this ServerB that has the tape drive attached to it.

From ServerA I issue the command at the Linux prompt

#bscan -s -m -c bacula-sd.conf -v -V My_Tape_Vol01 /dev/nst0

and the following is displayed.

#bscan: butil.c:287 Using device: "/dev/nst0" for reading.
16-Sep 18:19 bscan JobId 0: Warning: acquire.c:239 Read open device "TapeStorage" (/dev/nst0) Volume "My_Tape_Vol01" failed: ERR=dev.c:513 Unable to open device "TapeStorage" (/dev/nst0): ERR=No such file or directory

Mount Volume "My_Tape_Vol01" on device "TapeStorage" (/dev/nst0) and press return when ready:

The above message is obvious as the Tape drive isn't attached to /dev/nst0 on ServerA

My Question is: How can I get bscan on ServerA to 'see' the tape drive on ServerB?

Thanks
Lisa ShawAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dipopoCommented:
Can you try sharing the NFS file system from server B and mounting this for server A. I think this might work but not tried with tapes as I use disks for Bacula.

http://www.cyberciti.biz/faq/centos-fedora-rhel-nfs-v4-configuration/
0
Lisa ShawAuthor Commented:
Many thanks for your comment and the url link.

I've thought of using NFS but the tape drive isn't a file-system (it's bacula stuff), and I think bacula's bscan wants to read the tape volume from /dev/nst0.  Is there a way in Linux to define a remote device accessible from another server?

BTW I copied the bacula-sd.conf file from ServerB to ServerA.
0
dipopoCommented:
Wait! can't you run bscan from the bacula-sd server? I normally have bacula-dir and bacula-sd on same box, so do you get bconsole on the bacula-sd server?

I guess the file copy A-B is why it thinks it should see the device when run on the bacula-dir.
0
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Lisa ShawAuthor Commented:
Unfortunately the bacula-dir and bacula-sd are installed on different servers, bconsole works fine.

I attempted to run bscan from the bacula-sd I now get a different error.

1) I shutdown the bacula-sd
2) I mount the tape
    #mt -f /dev/nst0 rewind
3) #bscan -h bacula-dir-host -u bacula -P thePassword -s -m -c bacula-sd.conf -v -V My_Tape_Vol01 /dev/nst0

Now I get the following:

bscan JobId 0: Ready to read from volume "My_Tape_Vol01" on device "TapeStorage" (/dev/nst0).

bscan: ERROR TERMINATION at bscan.c:305
postgresql.c:248 Unable to connect to PostgreSQL server. Database=bacula User=bacula

Possible causes: SQL server not running; password incorrect; max_connections exceeded.

I can successfully logon to the Postgress DB (which is on the bacula-dir server) using the same login credetials.

The IP address for the bscan -h bacula-dir-host is defined correctly in /etc/hosts on the bacula-sd server (where I'm issuing the bscan command).

Clearly running bscan from the bacula-sd server cannot connect to the Postgres db!

Help!!!

Thanks
0
dipopoCommented:
Please have a look at enabling remote connectivity for postgre

http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Lisa ShawAuthor Commented:
The solution is Spot on!

You MUST run bacula's bscan from the same server (usually the bacula-sd) where the tape drive is attached. This solution works for me as the bacula-dir (postgres db) is on a different server.

Thanks again!!
0
dipopoCommented:
Glad I could help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.