LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-07-2007, 10:29 AM   #1
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Rep: Reputation: 15
Extract data from a NetBackup tape without using NetBackup


Our tape drive is on a windows server unfortunetly. I have little information about what's on the tape other than I know it was created with Veritas NetBackup. We do not have NetBackup. Is there any way to get the data off the tape without it?

I don't know how the responsibility for this fell on me, but if I don't figure it out I am dead meat
 
Old 05-07-2007, 12:38 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
NetBackup uses a modified version of GNU Tar to do backups. So long as what you have was single stream you should be able to pull off the data with the tar you get in Linux because it is also GNU tar.

Of course the above assumes you have a tape drive you can read the data in from.

To see contents you could do something like:
tar tvf /dev/nst0

To extract contents you could do something like:
tar xvf /dev/nst0 (do the tvf above first just so you'll know what you're going to get).

Also NetBackup puts multiple images on tapes. You have to use the mt commands to fsf to next backup image.

nst0 would be your first tape drive's no rewind device. st0 would be the rewind device.

Type the following for more details:
man tar
man mt

Failing all that there are companies like Pivar that will convert data from one medium to another for a fee.

P.S. The reason it fell to you is because everyone knows UNIX/Linux admins are smarter than "certified" M$ admins.
 
Old 05-07-2007, 12:44 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,803

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
This might also help
http://www.backupcentral.com/compone...%22_command%3F
 
Old 05-07-2007, 01:40 PM   #4
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Funny. They tell you how to get it with tar AFTER assuming you've run all the NetBackup commands you don't have to tell you WHAT to get.

But it does have some mt and tar examples towards the bottom so has some value.
 
Old 05-07-2007, 02:32 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,803

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
True, the notes were the main reason I posted the link. It does contain some basic information on tape layout etc.
 
Old 05-07-2007, 04:34 PM   #6
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Original Poster
Rep: Reputation: 15
I got side tracked with somone elses problem they had me on. After having a look at those notes it looks kind of ugly. The fact that I have zero experience with tape drives and the fact that they aren't mountable and easy to deal with isn't helping my confidence in porking around on a live system with who even knows how sensitive data. To be honest I might cop out and find an "unofficial" version of netbackup to do this little one time transaction.
 
Old 05-08-2007, 12:51 PM   #7
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Installing NetBackup itself is fairly complex so you will likely end up with issues just getting things going. Add to that the fact that after you installed it you would have to tell NetBackup to scan the tape (a very long process) before it can use it with NetBackup. It hardly seems worth the effort for one tape even for an experienced NBU admin. Also do you even know what version of NBU it was written in?

The commands tar and mt that I listed are native Linux/UNIX commands so you can use them without having NetBackup installed. So long as you use "tar t..." you can't do any damage - it only LISTS the files. It is "tar x..." that actually extracts them.
 
Old 05-14-2007, 03:39 PM   #8
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Original Poster
Rep: Reputation: 15
Every attempt to get at the data on the tape points to it not even being a tar archive. The output was somewhere along the lines of: This is not a tar archive, exiting.

NetBackup is a nightmare in an of itself. The program seems to wnat to do everything BUT simply dump the contents of a tape to a directory.

At this point they've dumped the project onto someone else, but I still would have liked to been able to accomplish SOMETHING from all this.

In the event that the files are not tar files, how do I tell what they are? Is there any way to just look at the files on the tape?

I find it hard to believe that there isn't a way to just dump whatever is on the tape AS IS onto a hard drive.
 
Old 05-15-2007, 02:31 AM   #9
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023
Try the examples here using dd cmd: http://en.wikipedia.org/wiki/Dd_(Unix).
Also note that they might have gzipped the files during tape write, in which case you need tar tz ... where 'z' means (un)gzip in this instance.
If it was a Unix style backup, you may even have to consider cpio http://en.wikipedia.org/wiki/Cpio, although I believe it's rare to use that these days.
You could even try the file cmd I guess, which is pretty good at guessing what you are dealing with here.
 
Old 05-15-2007, 08:15 AM   #10
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
If it was NetBackup it was definitely "tar". How sure are you that it was NetBackup though?

Did you try rewinding the tape with mt command? Running commands with mt to step ahead to next tape mark and trying the tar again?

You could always try "file /dev/<drive>" after rewinding the tape and see if it tells you what kind of header it was.

Also as pointed out by someone else you can try doing a dd off the tape to the hard drive then doing "file" command on the result to see what it thinks it is.

I did point out that trying to get NetBackup installed was going to be more trouble than it was worth.
 
Old 05-16-2007, 09:25 AM   #11
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Original Poster
Rep: Reputation: 15
Quote:
I did point out that trying to get NetBackup installed was going to be more trouble than it was worth.
Indeed, but my boss insisted.

Unfortunetly they scsi card and tape drive had to be moved to one of the production servers (running windows). They gave me another scsi card so I could connect to the tape drive, but there doesn't seem to be a driver for it anywhere. Ever heard of a magma pci scsi card??

So this whole thing is on hold until I get my hands on another scsi card or convince them to put cygwin on the windows server. What a pain.

I'm not entirely sure the tape was writen with netbackup, it's just what I was told. But one reason it was saying that the file was not a tar archive was that it wasn't rewound. What I would like to do now is just dd it to a hard drive then run file on it. Here's to hoping they have a 200gig hard drive lieing around.
 
Old 05-16-2007, 09:45 AM   #12
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Never heard of it but a quick Google search gave me a link that redirected to:

http://www.magma.com/support/

You might want to check there.

Looking at the cached information for the link:
http://64.233.167.104/search?q=cache...ient=firefox-a

It appears to be an old compatibility matrix that includes RH 9 (Linux Kernel 2.4). If you're using a Linux kernel 2.4x and it is one of the models that says "driver not required" it may be included in your kernel. If it is one of the other models you need to go to the first link and find the driver. If it you're using a 2.6 kernel it may not be there any longer (some things that worked in 2.4 were dropped in 2.6). You'd have to see if Magma could help you out.
 
Old 05-30-2007, 09:51 AM   #13
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Original Poster
Rep: Reputation: 15
We got a new scsi card and I finally had a chance to try something.

I ran this 3 times:
dd bs=65536 if=/dev/nts0 of=/media/sda2/raw_tape_dump/data#

the first two times gave me 1k files that looked like header files. The third was 44G. When I try the file command on it it just says 'data' and tar does not recognise it as a tar file.

So am I screwed?

(edit: actually the first 2 had to be run at bs=1024)

Last edited by kav; 05-30-2007 at 09:56 AM.
 
Old 05-30-2007, 10:15 AM   #14
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,950
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
If you run "strings" against the "data" file does it show you anything meaningful?

By the way - in a separate thread someone asked about restoring Windows backups made with NetBackup using GNU tar. On checking with the NetBackup admins list, Curtis Preston, who has written books on the subject, as well as someone else said they've never found a way to read Windows backups of that type on Linux/UNIX.

You may wish to point your boss at:
www.pivar.com

I used them years ago to extract data from an old Xenix drive. Not sure if they have a way to determine what is on the tape and extract it in a meaningful way but they might.
 
Old 05-30-2007, 10:18 AM   #15
kav
Member
 
Registered: May 2006
Location: USA
Distribution: FreeBSD Ubuntu Debian
Posts: 137

Original Poster
Rep: Reputation: 15
strings gave me human readable text output of what looks like stuff that would be in sql tables and other data.

What do I do with it?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need trialversion of Veritas netbackup for Linux or Solaris vedang Linux - Enterprise 1 12-21-2006 09:35 AM
Veritas NetBackup ~ Comparing files JerryMcFarts Linux - Enterprise 5 08-28-2006 02:41 PM
netbackup on Fedora core 5 not working speut Fedora 2 08-02-2006 08:29 AM
NetBackup not talking to Linux servers rdchambers Linux - Networking 1 02-10-2006 04:03 PM
Vertitas netbackup on rh v8 robmcw Linux - Networking 3 02-10-2006 02:30 PM


All times are GMT -5. The time now is 07:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration