CPIO problems

CPIO problems

Post by Brian S Hile » Thu, 26 Oct 1995 04:00:00



: I have date backup from UNIX sys V to tape using commands

:        find / -print | cpio -oucvdB > /dev/rmt0   (SVR 4)
:    or
:        find / -print | cpio -oucvdB > /dev/ctape  (on UNIXWARE 2.0)

: I am trying to restore the tape on SUN OS 4.1.3 using command            

:        cpio -itB < /dev/rst0 or (/dev/rst8) Check for the contents of tape.
:        cpio -it  < /dev/rst0 or (/dev/rst8)

: Both commands give me the error:  
:        cpio : this is not a cpio file: bad  magic number.

: I am not sure what wrong with it. Is it other options that I need to turn on.
: Have anyone had backup on SVR4 and restore on SUN OS ????

: Thanks for any comment or suggestions.

Without knowing too much about either machine, I guess that you failed because:
* you didn't supply the appropriate "c" option to the cpio restore.

* or that the data bytes have been swapped. The "magic number" for cpio is
  the character string "070707" at the very beginning of the archive file,
  and if cpio doesn't see this, it will not recognize the archive as its own.
  To determine: grab a few raw records from the tape:
  $ dd if=/dev/rst8 count=1 | more
  if the data look "weird", investigate the "swab" option of "dd" to reorder.

* If memory serves, the "blocking factor" for a /dev/rmt8 device on a Sparc
  is 20. The blocking number has to match between the source and destination
  machines, I believe. Again, use "dd" to grab the data, and let "cpio" have
  at it from the *file* created, not the *tape device*.

send me e-mail to tell me if any one of these methods have brought you success.

 
 
 

CPIO problems

Post by Guy Harr » Thu, 26 Oct 1995 04:00:00



Quote:>Without knowing too much about either machine, I guess that you failed because:
>* you didn't supply the appropriate "c" option to the cpio restore.

>* or that the data bytes have been swapped.

...or because the SVR4 "cpio", by default, writes an archive in "new
SVR4 'cpio'" format if you use the "-c" flag, and the SVR3-vintage
"cpio" in SunOS 4.1.3 doesn't understand that format.  You have to use
the "-H odc" option to the SVR4 "cpio" to get it to write out an archive
in the "-c" format supported by pre-SVR4 "cpio"s.

Quote:>  The "magic number" for cpio is
>  the character string "070707" at the very beginning of the archive file,
>  and if cpio doesn't see this, it will not recognize the archive as its own.

It probably won't see it - the magic number for an SVR4 "-c" format
"cpio" archive appears to be a string of "070701".  (There's also "-H
crc" format, which adds a per-file checksum, and has, as its magic
number, a string of "070702".)

 
 
 

1. cpio problem

All,

I have come across a strange problem. The cpio utility is used to
archive data to tapes. This usually worked well until recently. Now,
every time the process starts writing to the third tape I get an error
'cpio: cannot open "/dev/rmt/0cn", errno 16, device busy'. Please note
that there are files with sizes greater than 8 GB to be archived. I have
been told that the '-H odc' option would overcome the limitation of cpio
with files greater than 8 GB. I also have been told that the '-c' & '-H
odc' options are mutually exclusive and should not be used together. I
notice however that I get no error even though that may be so. Any
comment on this?

The command used is shown below.

cat ${BKUPF} | cpio -ocvB -H odc -O ${BKDEV} -M "Insert Tape %d and
Press
[ENTER]"

The variable ${BKUPF} expands to a fully qualified filename containing
the
list of files to be backed up.  And ${BKDEV} expands to /dev/rmt/0cn.

Thanks.

2. Old sound card.

3. cpio problems

4. sysadmin salary

5. hpux cpio problem

6. #9 MOTION 771 HELP!!!!!!! =(

7. CPIO problem

8. Networking Linux/windows

9. CPIO problems

10. cpio problems

11. cpio problem

12. GNU CPIO problems

13. Restoring the root fs with cpio problem