Operating System - HP-UX
1824724 Members
3738 Online
109674 Solutions
New Discussion юеВ

cpio -ovmB returns exit code of "2"

 
Kirk Reindl
Frequent Advisor

cpio -ovmB returns exit code of "2"

Hi:
I'm running my daily backup using the cpio
-ovmB command. Occasionally the backup will have a return value of "2".

I looked at the man page for cpio and the explaination of return value of "2" is:

"Out-of-phase error. A file header is corrupt or in the wrong format."

I have seen this message before, but only when I tried restoring data.

I guess this is my question. Can someone explain to me why on a backup I'm getting this file header is corrupt or in the wrong format return code? To me, if I'm making the backup I should be creating the file header. Why would it be corrupt or in the wrong format? It works other nights without a problem.

I know this problem is very general, but any info you could give me would be appreciated.

Thanks
Kirk
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: cpio -ovmB returns exit code of "2"

Could you possibly be running out of tape or have bad tapes? Try new tapes every night for a month? Try adding the "c" option to your backup.

live free or die
harry
Live Free or Die
Darrell Allen
Honored Contributor

Re: cpio -ovmB returns exit code of "2"

Hmmm... Wonder if a mediainit on the tape would help? Perhaps it's worth a shot.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Sanjay_6
Honored Contributor

Re: cpio -ovmB returns exit code of "2"

Hi Kirk,

An out of phase error means:

quote //
The Out of phase message in the middle of a restore indicates that cpio has encountered a portion of the tape that it cannot read.

This has caused cpio to lose its place. cpio needs instructions from the operator to resync to the next file since there will be data loss.

The way to recover is to reinvoke cpio the same as before, but add the -R option.

If it is possible to resync to the next file header, it will be done. The file that contains the bad spot will be lost.

//unquote

hope this helps.

thanks
Kirk Reindl
Frequent Advisor

Re: cpio -ovmB returns exit code of "2"

Thanks to all who replied. But my operator tried new tapes, but we still got the same result.