Operating System - HP-UX
1833744 Members
2406 Online
110063 Solutions
New Discussion

How to figure out what's on a tape

 
samd_1
Super Advisor

How to figure out what's on a tape

I have a couple tapes that say like "Backup Jan" or something like that on the outside. There was no strategy in place when the old Sys admin was here so I have no idea what was used to do this backup or what exactly it is. I'd like to find out what's on the tape. I tryed used SAM (fbackup) and it said there was no fbackup on the tape. I tryed TAR -tvf and it told me "Tar: blocksize = 1". So now I'm trying the "restore -tf /dev/rmt/0m >INDEX". I can do a mt on the tape by the way. However when I try the Restore option I get either a "Tape read error: I/O error" or "Tape read error: I/O error". I've tryed multiple tapes and I get the same thing and I've tryed adding "-b 512" and "-b 1024" to the "restore -tf /dev/rmt/0m -b 512 >INDEX" command too. Any help?
11 REPLIES 11
Jitendra_1
Trusted Contributor

Re: How to figure out what's on a tape

The best way will be to use "dd" on these tapes. if you have some free disk space , copy the contents from this tape to disk using dd , and then check on the disk what files are those.
Learning is the Key!
Larry Basford
Regular Advisor

Re: How to figure out what's on a tape

It could be a vxdump backup. It's what we use.
/usr/sbin/vxdump -0 -f /dev/rmt/0mn -u /var

use vxrestore if /dev/rmt/0mn
to see if it puts you in interactive mode.

vxrestore >

Check it out. I feel it's one of the most overlooked backups that come free with HPUX

Desaster recovery? Right !
samd_1
Super Advisor

Re: How to figure out what's on a tape

Don't have the space right now and it's not that important to me to actually get the data with DD. Concerning these tapes I'm sorta just curious how a sys admin would find out what's on the tape. The VDUMP/VRESTORE or whatever could be it I guess and I'll try it. I'll have to read up on this.
Steven Sim Kok Leong
Honored Contributor

Re: How to figure out what's on a tape

Hi,

If you are running an Omniback Cell Server, Omniback allows you to scan the tape. Scanning media checks the format of media insert. Omniback recognises quite a considerable number of formats including cpio, dump, tar and gzip formats.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Tommy Palo
Trusted Contributor

Re: How to figure out what's on a tape

Another possibility is that the tape was created with 'cpio' in some way.
In that case you can check the contents with:
cpio -it[v] < /dev/rmt/0m
Keep it simple
Carlos Fernandez Riera
Honored Contributor

Re: How to figure out what's on a tape

Nick W
Frequent Advisor

Re: How to figure out what's on a tape

Sam,

ANY site-documentation you can find which gives any clues as to any fancy options should help...
If the backups were controlled by cron, then maybe there is a script which gives a clue...

Meanwhile, use "dd" to pull off a few blocks from the tape and then use "file" command to try to deduce the format of the data:

dd if=/dev/rmt/0m of=/tmp/foo count=10
file /tmp/foo

The "file" output should be able to tell if it was a tar, cpio etc format. If not you should be able to peek into the file and deduce what format the data is.

You may have to spend some time playing with blocksizes. Many backup utilities put more than one "fileset" onto the tape - so you would probably have to repeat the dd exercise using the no-rewind device:

(repeat this loop for as many iterations as there is data coming off the tape...)
dd if=/dev/rmt/0mn of=/tmp/foo1 count=10
file /tmp/foo1

then:
dd if=/dev/rmt/0mn of=/tmp/foo2 count=10
file /tmp/foo2

and so on...

Happy sleuthing.
( I hope that you don't have to do any restores in the next few weeks whilst you build up a new stock of well-documented procedures and well-labelled media, containing useful data like date/type of backup and command used etc)
:-)

Regards,
Nick
melvyn burnard
Honored Contributor

Re: How to figure out what's on a tape

the pax command will uickly tell you if it is cpio or tar format.
do man pax

My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
samd_1
Super Advisor

Re: How to figure out what's on a tape

I tryed the dd and this produced the tape header it looks like cause it had the volume name. Other than that everything else was binary.
Bill Hassell
Honored Contributor

Re: How to figure out what's on a tape

You might try the file command. It tries many different formats by reading the first few bytes of a file and doing some 'magic' (actually, /etc/magic).


Bill Hassell, sysadmin
samd_1
Super Advisor

Re: How to figure out what's on a tape

Mevlyn, I couldn't figure out what to really try with the PAX command so I gave up on that.

Everyone else, thanks for your help. I will try the file command on the results on the "dd" command result files and see if this'll tell me.

Basically of the 4 or 5 tapes I have I'm guessly a couple in there at least may not even have been a backup from the machine. I say this because when a backup of a file was tryed on one of the tapes (with help from HP on-phone assistance) a message about not recognizing the header was returned. The support person asked if the tape was used by another program or something so I'm guessing it/they have been. My best hope is to try and write to them all and any that fail I'll try a mediaint on them. The data on the tapes isn't needed anyway. Thanks for everyones help.