Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cpio - cpio: this is not a cpio file, bad header

Status
Not open for further replies.

hellsing

MIS
Sep 3, 2001
97
0
0
GB
I have a backup running which runs a cpio command to backup the entire SCO system to tape.

50% of the time it is succesfully finishing writing to tape but when I verify it I get the error:

cpio: this is not a cpio file, bad header

The command I use to write the backup is:
find . -print | cpio -ocB >/dev/dat 2>>/tmp/backuplog

The command I use to vefify the backup is:
cpio -ictB </dev/dat 2>>/tmp/backuplog

Has anyone got any ideas why the cpio write would work but the verify wouldn't. T

Thanks
 
Its a dat tape drive. Are you meaning I should maybe issue a rewind command before doing the verification.
 
Since you haven't specified what OS you are using, i will give you the openserver example.

Tape devices are generally created in three flavours:

rct0 (rStp0) - rewinding tape device
nrct0 (nrStp0) - non-rewinding tape device
xct0 (xStp0) - tape status device

the 0 will be replaced by increasing numbers if you define more than 1 device. There are some other device names that apply to older drive technology but they are generally not used.

What is the minor number of the /dev/dat device?

The following table should decode what it refers to:
Code:
   7 6 5 4 3 2 1 0           Description
   - - - - - X X X           Device number +
   - - - - X - - -           No rewind on close
   - - - X - - - -           Retension tape on open 
   - - X - - - - -           Perform ECC on data
   X - - - - - - -           Override/control device
This will tell you what the device is and whether or not you need to issue a rewind command before "verifying".

p.s. this method of verifying only verifies that the tape is readable, not that it is a accurate backup.
 
I agree with the above posts and would add you should first rewind the tape before you issue the backup script then when you verify, rewind the tape again to insure that you are starting at the begining of the tape.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top