Extracting files from corrupted tape


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Extracting files from corrupted tape
# 1  
Old 03-28-2008
Extracting files from corrupted tape

I've got a backuptape in cpio format that was accidentally overwritten with a very small batch file. As I assume that the cpio header has been overwritten, I cannot extract files from the backup in the conventional manner:

( cpio -itv </dev/rct0
cpio: this is not a cpio file, bad header)

I've tried dd if=/dev/rct0 of=output which has produced a single large file The cpio actually records the contents of three directories. As these are large I'm hoping that I can recover data from the second and third directories.

Is there a specific dd expression (or any other expression) that I can use to strip out the contents ?

All suggestions appreciated. Thanks.

Martin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get CRC check sum of files in java EAR file without extracting .jar/.war files to disk.?

unzip -v gives CRC info of each file in a zip(in my case .EAR) file. # unzip -v my-application.ear Archive: my-application.ear Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 197981 Defl:N 183708 7%... (1 Reply)
Discussion started by: kchinnam
1 Replies

2. Hardware

Files getting corrupted

$ uname -a Linux darksun 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:45 UTC 2014 i686 athlon i686 GNU/Linux My files are getting corrupted on a frequent basis. $ sudo fdisk -l /dev/sda Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total... (10 Replies)
Discussion started by: rlopes
10 Replies

3. Shell Programming and Scripting

Extracting specific files from multiple .tgz files

Hey, I have number of .tgz files and want to extract the file with the ending *results.txt from each one. I have tried for file in *.tgz; do tar --wildcards -zxf $file *results.txt; doneas well as list=$(ls *.tgz) for i in $list; do tar --wildcards -zxvf $i *.results.txt; done... (1 Reply)
Discussion started by: jfern
1 Replies

4. Shell Programming and Scripting

Extracting/condensing text from multiple files to multiples files

Hi Everyone, I'm really new to all this so I'm really hoping someone can help. I have a directory with ~1000 lists from which I want to extract lines from and write to new files. For simplicity lets say they are shopping lists and I want to write out the lines corresponding to apples to a new... (2 Replies)
Discussion started by: born2phase
2 Replies

5. HP-UX

WinRAR files are corrupted after FTP

In my Windows 2003 server machine I have a winrar or winzip file that i around 3GB. This zip/rar file is ftped to a unix mahine (HPUX) . FTP is successful. But when it get this file to check if its has been ftped correctly, the file is corrupted. Is there something wrong that i am doing while... (4 Replies)
Discussion started by: maroli
4 Replies

6. Solaris

PAM login library files corrupted, have ILOM, can I get root?

I was installing sfw sudo and its dependencies (libiconv, libintl, libgcc)on Solaris 10, running on an x86 x4200 and I corrupted some PAM library files. It's a standard Solaris 10 base install, with some added software & libraries from a vendor. I am on console trying to get root access back,... (1 Reply)
Discussion started by: Mariognarly
1 Replies

7. Shell Programming and Scripting

Fixing corrupted vcard files.

KDE's Kontact PIM breaks quoted-printable vcard files because it linebreaks in the middle of a word. Take this text for example: NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=D7=A9=D7=95=D7=A8=D7=94 =D7=A 8=D7=90=D7=A9=D7=95=D7=A0=D7=94.\n=D7=94=D7=A9=D7=95=D7=A8=D7=94 =D7=94=D7= ... (7 Replies)
Discussion started by: dotancohen
7 Replies

8. UNIX for Advanced & Expert Users

Reading from a corrupted tape

I've got a backuptape in cpio format that was accidentally overwritten with a very small batch file. As I assume that the cpio header has been overwritten, I cannot extract files from the backup in the conventional manner: ( cpio -itv </dev/rct0 cpio: this is not a cpio file, bad header) ... (0 Replies)
Discussion started by: mart4179
0 Replies

9. UNIX for Dummies Questions & Answers

Corrupted files from Windows to Unix Sco

I downloaded some applications from CD on a windows2000 PC to a Unix Sco machine using the WS-FTP program. When I tried to run the applications on the Unix machines I got an error. The files must have been corrupted in the process of transferring files from a Windows 2000 to a Unix Sco... (9 Replies)
Discussion started by: BAM
9 Replies

10. UNIX for Dummies Questions & Answers

extracting file form tape

Hello all, I have done a search and follow the direction on how to extract a file form tar tape. With 1.) tar xf /dev/rmt/0 <filename> 2.) tar xf /dev/rmt/0 <fullpath/filename> Both of these do not seem to work. Heres the scope I do daily backup of a 10g disk on to a DDS4 tape. With... (4 Replies)
Discussion started by: larry
4 Replies
Login or Register to Ask a Question
CPIO(1) 						    BSD General Commands Manual 						   CPIO(1)

NAME
cpio -- copy file archives in and out SYNOPSIS
cpio -o [-aABcLvzZ] [-C bytes] [-F archive] [-H format] [-O archive] < name-list [> archive] cpio -i [-bBcdfmrsStuvzZ6] [-C bytes] [-E file] [-F archive] [-H format] [-I archive] [pattern ...] [< archive] cpio -p [-adlLmuv] destination-directory < name-list DESCRIPTION
The cpio command copies files to and from a cpio archive. The options are as follows: -o Create an archive. Reads the list of files to store in the archive from standard input, and writes the archive on standard output. -a Reset the access times on files that have been copied to the archive. -A Append to the specified archive. -B Set block size of output to 5120 bytes. -c Use ASCII format for cpio header for portability. -C bytes Set the block size of output to bytes. -F archive -O archive Use the specified file name as the archive to write to. -H format Write the archive in the specified format. Recognized formats are: bcpio Old binary cpio format. cpio Old octal character cpio format. sv4cpio SVR4 hex cpio format. tar Old tar format. ustar POSIX ustar format. -L Follow symbolic links. -v Be verbose about operations. List filenames as they are written to the archive. -z Compress archive using gzip(1) format. -Z Compress archive using compress(1) format. -i Restore files from an archive. Reads the archive file from standard input and extracts files matching the patterns that were speci- fied on the command line. -b Do byte and word swapping after reading in data from the archive, for restoring archives created on systems with a different byte order. -B Set the block size of the archive being read to 5120 bytes. -c Expect the archive headers to be in ASCII format. -C bytes Read archive written with a block size of bytes. -d Create any intermediate directories as needed during restore. -E file Read list of file name patterns to extract or list from file. -f Restore all files except those matching the patterns given on the command line. -F archive, -I archive Use the specified file as the input for the archive. -H format Read an archive of the specified format. Recognized formats are: bcpio Old binary cpio format. cpio Old octal character cpio format. sv4cpio SVR4 hex cpio format. tar Old tar format. ustar POSIX ustar format. -m Restore modification times on files. -r Rename restored files interactively. -s Swap bytes after reading data from the archive. -S Swap words after reading data from the archive. -t Only list the contents of the archive, no files or directories will be created. -u Overwrite files even when the file in the archive is older than the one that will be overwritten. -v Be verbose about operations. List filenames as they are copied in from the archive. -z Uncompress archive using gzip(1) format. -Z Uncompress archive using compress(1) format. -6 Process old-style cpio format archives. -p Copy files from one location to another in a single pass. The list of files to copy are read from standard input and written out to a directory relative to the specified directory argument. -a Reset the access times on files that have been copied. -d Create any intermediate directories as needed to write the files at the new location. -l When possible, link files rather than creating an extra copy. -L Follow symbolic links. -m Restore modification times on files. -u Overwrite files even when the original file being copied is older than the one that will be overwritten. -v Be verbose about operations. List filenames as they are copied. ENVIRONMENT
TMPDIR Path in which to store temporary files. DIAGNOSTICS
The cpio utility will exit with one of the following values: 0 All files were processed successfully. 1 An error occurred. Whenever cpio cannot create a file or a link when extracting an archive or cannot find a file while writing an archive, or cannot preserve the user ID, group ID, file mode, or access and modification times when the -p option is specified, a diagnostic message is written to stan- dard error and a non-zero exit value will be returned, but processing will continue. In the case where cpio cannot create a link to a file, cpio will not create a second copy of the file. If the extraction of a file from an archive is prematurely terminated by a signal or error, cpio may have only partially extracted the file the user wanted. Additionally, the file modes of extracted files and directories may have incorrect file bits, and the modification and access times may be wrong. If the creation of an archive is prematurely terminated by a signal or error, cpio may have only partially created the archive which may vio- late the specific archive format specification. SEE ALSO
pax(1), tar(1) AUTHORS
Keith Muller at the University of California, San Diego. BUGS
The -s and -S options are currently not implemented. BSD
February 16, 1997 BSD