FIXCPIO

Section: David Brower (1)
Updated: UNIX-PC
Index Return to Main Contents
 

NAME

fixcpio - repair damaged cpio -c archives  

ORIGIN

David Brower, {gladys, sun, amdahl, mtxinu}!rtech!daveb  

SYNOPSIS

fixcpio [ infile [ outfile ] ]  

DESCRIPTION

Fixcpio Reads the standard input (or the named infile) and writes a cpio -c archive to the standard output (or named outfile). Infile and outfile may be the dash character (`-') to signify standard in or out.

The input is presumed to be a cpio -c archive. While the input is copied to the output, fixcpio checks each archive member for sanity, and discards those that appear to be bad. The program writes the names of archive members copied on stderr, and says

        Skipping bad member ``filename''
        
for each bad record. This eliminates the cheerful ``Out of phase--get help'' message from cpio.

The major use for fixcpio is in recovering multiple floppy backups when one disk in the set goes bad. The process for the UNIX-PC is about as follows.

1. Get images of the remaining floppies in files that are in alphabetical order:

        # works with up to 99 disk backup sets.
        #
        # if, ibs, and count will depend on your machine and
        # backup procedure.
        disk=01
        while :
        do
                echo "Interrupt to quit, return to read disk $disk \c:"
                read answer
                dd if=/dev/rfp/021 ibs=1024 count=320 of=disk-$disk
                dismount -f
                disk=`awk "{ printf \"%02d\n\", $disk + 1 }" `
        done

2. Restore the contents of the disks with fixcpio's help.

        cat disk-* | fixcpio | cpio -icdum

 

FILES


/tmp Holds a temp file containing the archive member currently being examined.  

BUGS

Fixcpio does not understand binary cpio archives.

Getting disk images from the floppies depends on both the machine and
    your backup procedures.  You need to know how the floppies are
    written before you start recovering, and this might be awkward if
    you've lost your hard disk.

Using a temp file is a kludge, needed because you can't seek around on input from a pipe.

Status messages should probably be toggled with a -v `verbose' flag.


 

Index

NAME
ORIGIN
SYNOPSIS
DESCRIPTION
FILES
BUGS

This document was created by man2html, using the manual pages.
Time: 06:28:50 GMT, December 12, 2024