Sponsored Content
Operating Systems Solaris UNIX : how can I recover a corrupt tar file from a tape? Post 302965073 by hicksd8 on Saturday 23rd of January 2016 08:57:07 AM
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.
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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

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

7. 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

8. 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

9. 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
dds-dd(1)						      General Commands Manual							 dds-dd(1)

NAME
dds-dd - tool to read a dds device. SYNOPSIS
dds-dd [ -f device ] DESCRIPTION
dds-dd reads a dds tape devices (DAT). Every block is read and written to stdout. A tape with unknown block size or blocks of different size can be read. The default device is /dev/rmt0, which may be overridden with the environment variable TAPE, which in turn may be overridden with the -f device option. The device must be a character special file. OPTIONS
-f device Device of the tape archive (default is /dev/rmt0). Must be a character special file connected to a dds tape device. -V,--version Print the version number of mt-dds to stderr and exit immediately. --help print some screens of online help with examples through a pager and exit immediately. EXAMPLES
Example: Read the tape and make a listing: dds-dd | tar ft - Example: Read the tape and make a listing: dds-dd | cpio -it ENVIRONMENT
The environment variable TAPE overrides the default tape device /dev/rmt0. SEE ALSO dds2tar(1), dds2index(1), mt(1), tar(1) HISTORY
This program was created to use it in conjunction with dds2tar. AUTHOR
J"org Weule (weule@cs.uni-duesseldorf.de), Phone +49 211 751409. This software is available at ftp.uni-duesseldorf.de:/pub/unix/apollo 2.4 dds-dd(1)
All times are GMT -4. The time now is 03:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy