Operating System - HP-UX
1846945 Members
4377 Online
110257 Solutions
New Discussion

Question about to show the content of an DLT-tape?

 
ekke2
Occasional Advisor

Question about to show the content of an DLT-tape?

Can I check the content of an DLT tape with
tar -t, no matter what kind of backupprogram have done the backup to the DLT-tape in HP-UX?
20 REPLIES 20
Pete Randall
Outstanding Contributor

Re: Question about to show the content of an DLT-tape?

Sure, you can run tar -t against any type of tape, produced by any type of backup program. However, if you want meaningful results, only expect to get them from tapes produced by tar.


Pete

Pete
Raj D.
Honored Contributor

Re: Question about to show the content of an DLT-tape?

Ignite backup tapes cannot be viewd with tar , unless you do Forward space count files (fsf) to 1 with mt.

hth,
Raj
" If u think u can , If u think u cannot , - You are always Right . "
Robert-Jan Goossens
Honored Contributor

Re: Question about to show the content of an DLT-tape?

Try dd'ing a part of the file from tape to disk and run the file command.

# dd if=/dev/rmt/Xm of=/tmp/foo =count=10
# file /tmp/foo

Robert-Jan

TwoProc
Honored Contributor

Re: Question about to show the content of an DLT-tape?

If the goal is to "look" at what is on the tape,

you could "dd" it.

dd if=/dev/rmt/0m
(results would come to the screen which could mess up your terminal)

or

dd if=/dev/rmt/0m of=/somedir/somefilename

You can also:

strings -a /dev/rmt/0m

or

cat /dev/rmt/0m
We are the people our parents warned us about --Jimmy Buffett
A. Clay Stephenson
Acclaimed Contributor

Re: Question about to show the content of an DLT-tape?

No. Tar will only understand tar format tapes or files. In general when trying to determine the type of backup used to create a tape, the best approach is to extract the header or some portion of the header and examine it with a utilitity like od or xd. Often there are "magic numbers" (an actual technical term) that identify the type of backup and often one can simply recogize the type of backup by being familiar with the various formats.

Try something like this:

dd if=/dev/rmt/1m bs=1k count=1 | od -v -Ad -tao

This will print the first 1k chars of your tape in a meaningful format. If you don't recognize anything yourself then redirect the output to a file and post that. Someone will probably recognize what you have.
If it ain't broke, I can fix that.
Andrew Rutter
Honored Contributor

Re: Question about to show the content of an DLT-tape?

hi,

rewind the tape first with
#mt -f /dev/rmt/xmn rew

the read the contents with tar

#tar tvf /dev/rmt/xmn

dump it to the screen or redirect it to a file as required.

if its an ignite backup tape then move the tape forward first before reading
#mt -f /dev/rmt/xmn rew
#mt -f /dev/rmt/xmn fsf1
#tar tvf /dev/rmt/xmn


Andy
ekke2
Occasional Advisor

Re: Question about to show the content of an DLT-tape?

With this
# dd if=/dev/rmt/0m bs=1k count=1 | od -v -Ad -tao
I got following result
dd read error: I/O error
0+0 records in
0+0 records out
0000000
#

Can someone tell me what this means?
Stephen Keane
Honored Contributor

Re: Question about to show the content of an DLT-tape?

It means either (a) the tape is positioned beyond the end of any data (in which case rewind the tape) or (b) there is no data on the tape.
Stephen Keane
Honored Contributor

Re: Question about to show the content of an DLT-tape?

Just as a matter of interest what does

# mt -f /dev/rmt/0m status

give you?
ekke2
Occasional Advisor

Re: Question about to show the content of an DLT-tape?

I got the following message.
# mt -f /dev/rmt/0m status
Drive: QUANTUM DLT8000
Format:
Status: [41118985] BOT online compression immediate-report-mode
File: 0
Block: 0
#
Stephen Keane
Honored Contributor

Re: Question about to show the content of an DLT-tape?

Well the tape is rewound (BOT) so that seems to indicate no data on the tape?

You could try

# dd if=/dev/rmt/0m of=/tmp/ekke count=10

(i.e. no block size)
ekke2
Occasional Advisor

Re: Question about to show the content of an DLT-tape?

I got the following info
dd read error: I/O error
0+0 records in
0+0 records out

with
dd if=/dev/rmt/0m of=/tmp/ekke count=10
Andrew Rutter
Honored Contributor

Re: Question about to show the content of an DLT-tape?

hi,

what output do you get if you try and read the tape like i suggested earlier

the read the contents with tar

#tar tvf /dev/rmt/Xmn

where X = your device file number

if you think the drive may have problems then try and do a test in cstm

Andy


ekke2
Occasional Advisor

Re: Question about to show the content of an DLT-tape?

The drive works fine.

With
tar tvf /dev/rmt/0mn
I get following message
Tar: tape read error
A. Clay Stephenson
Acclaimed Contributor

Re: Question about to show the content of an DLT-tape?

There seems to be a logical disconnect here:
The drive works fine.

With
tar tvf /dev/rmt/0mn
I get following message
Tar: tape read error

By any chance, are you trying to read a tape that was recorded on an SDLT drive?

Are you able to create and read back a tar image on this drive? The fact that dd can't read from the tape strongly suggests either a hardware problem or bad/blank media.

If it ain't broke, I can fix that.
Andrew Rutter
Honored Contributor

Re: Question about to show the content of an DLT-tape?

hi,

try a simple tar backup of /etc or something similar
then rewind the tape and try and read it

if this works it looks like bad media, if it fails a bad drive

Andy
V. Nyga
Honored Contributor

Re: Question about to show the content of an DLT-tape?

Hi,

when tar doesn't work, then you can try to read with SAM. In the backup/recovery area you have the option to list the content of a backup tape (could be the same like fbackup).
Else you can try to boot a client workstation with this tape.

Only some thoughts
Volkmar
*** Say 'Thanks' with Kudos ***
ekke2
Occasional Advisor

Re: Question about to show the content of an DLT-tape?

Ok!
I have another question, does anyone know what Compress and Density Override mean on the DLT-station?

Should some of these leds be on when are
backing files?
A. Clay Stephenson
Acclaimed Contributor

Re: Question about to show the content of an DLT-tape?

The "Density Override" LED inddicates that you have manually selected a density. It doesn't matter what density you choose for backing up although obviously the higher density will use less media. It does matter that the density used to read the medium matches that used when the medium was written. Normally for reading backups, the density override is not enabled and the drive will automaticaly adjust itself to match the recording density.
If it ain't broke, I can fix that.
Andrew Rutter
Honored Contributor

Re: Question about to show the content of an DLT-tape?

hi,

A clay is correct, this deteermines how much compression will be used on your backup tapes and as to how much data will physically fit on the tape.

Andy

Note:

please also to remember to go back through and assign points to the answers you have recieved for all your questions. this will ensure you still recieve the answers you require