UNIX : how can I recover a corrupt tar file from a tape?


 
Thread Tools Search this Thread
Operating Systems Solaris UNIX : how can I recover a corrupt tar file from a tape?
# 1  
Old 01-22-2016
UNIX : how can I recover a corrupt tar file from a tape?

I've a tape contains a corrupt tar file. I'm using Unix SunOS 5.5.1. So when I run this command :
Code:
dd if=/dev/rmt/0 of=/tmp/outputfile.tar

I get this error message :


Code:
warning /pci@1f, 0/pci@1/pci@1/sunw, isptwo@4/st@4,0 (sty):       Error for command : read Error Level: Fatal       Requested Block : 11900 Error Block : 11900       Vendor : TANDBERG             Serial Number: =:CREATED081       Sense Key: Media Error       ASC: 0x11 (unrecorded read error), ASCQ: 0x1, FRU: 0x0


Please Help me I really need solution for this problem
Moderator's Comments:
Mod Comment Please use CODE tags to display sample input, sample output, and code segments; not Bold tags.

Last edited by Don Cragun; 01-22-2016 at 11:55 PM.. Reason: Change B tags to CODE tags.
# 2  
Old 01-23-2016
It looks more like a corrupt support (media) rather than a bad file... Have you tried cleaning the heads, check the hmmm what is it DAT? or real tape or??? DAT can go faulty if not properly rewound before loading...
I had a case where a sysadmin was desperate and asked me to help him, when I ejected the DAT to look at its state Smilie I noticed the tape was broken Smilie ...
Poor guy was trying for hours...
# 3  
Old 01-23-2016
Lots of questions to ask about this.

Do you know for certain that it's a tar tape and not cpio or some other proprietary format?

Sometimes tape formats have a header so use a no rewind 'nr' device to prevent rewinding, stopping the tape where it is, and then try again.

Do you know the blocking factor the tape was written in?
If you're trying to read it raw with dd, trying appending each of bs=512, bs=1024, bs=2048 and bs=4096 to the dd command. Perhaps tar was configured to write a different block factor to what dd is defaulted.

DAT's always know internally (without reference to the O/S) if they are reading junk. The DAT mechanism writes enough checksums (created by the drive) to know when the integrity of the data is compromised.

---------- Post updated at 01:57 PM ---------- Previous update was at 11:57 AM ----------

Other thoughts are:-

also try bs=10240 in case it's written with the commonly used block size of 10k

Was the tape written by this DAT drive? Tape transports can go out of alignment (the posts that guide the tape) so you may well find that if you put the tape into the drive that wrote it, it will read with no problem.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies

2. Shell Programming and Scripting

validate tar file on tape

I've got a KSH/AIX question that I haven't been able to figure out yet. I've got a tape archive program that "tar's" data to a tape. After creating the archive, I'd like to somehow verify that the tape is actually good. So, what I'd like to do as a simple "sanity" check that I can read the tape... (9 Replies)
Discussion started by: dernsdorff
9 Replies

3. Shell Programming and Scripting

how to recover the truncate file in unix

how to recover the file in unix. Thanks in advance.:wall: (1 Reply)
Discussion started by: krbala1985
1 Replies

4. UNIX for Dummies Questions & Answers

Zipped tar file is corrupt

Hello, I am currently dumping 30-40 reports on a Unix folder located here /home/apps/reports/prode/excel I use K-shell to do this task. In that, I use the gzip command to compress these files. I want to be able to use a tar command to first load the entire directory into one file then gzip that... (2 Replies)
Discussion started by: Pramodini Rode
2 Replies

5. UNIX for Dummies Questions & Answers

find a corrupt tar file

Hey there I am just looking for a way to find a corrupt tar file. I want to write a script to help sift through the 1000's of tar files we go through daily and move any corrupt ones to a different directory structure. Is there an easy way to do this. (4 Replies)
Discussion started by: car2nst2006
4 Replies

6. UNIX for Dummies Questions & Answers

recover deleted file in unix

hi after using rm command how to recover the deleted file (7 Replies)
Discussion started by: arulkumar
7 Replies

7. UNIX for Dummies Questions & Answers

Writing tar file to tape

Hi Guy`s I`m a newbie to Unix and I`m starting to love it I got stuck donig backups of tar files to tape I use this to find all tar files find . -name '*.tar.*' > output in output there would be n of file eg. 6 the size output is 156 but tar files are: 9.3M Jul 18 09:48... (1 Reply)
Discussion started by: donovan
1 Replies

8. UNIX for Advanced & Expert Users

Does tar do crc checking on a tape or tar file?

Trying to answer a question about whether tar table-of-contents is a good tool for verifying tape data. (1 Reply)
Discussion started by: tjlst15
1 Replies

9. Solaris

How to recover a single file from tape

Hi I have taken a backup using /usr/sbin/ufsdump -0uf /dev/rmt/0n I want to recover one file from it but finding it hard nut to crack. Can you please give me a simple way of recovering it? Thanks (2 Replies)
Discussion started by: krishan
2 Replies
Login or Register to Ask a Question