1748122 Members
3204 Online
108758 Solutions
New Discussion юеВ

Re: cpio hp ux

 
Francisco Ferriols
New Member

cpio hp ux

Hello, I would like to read an easy document with examples about how to use
cpio . I?m fed up of reading getout of reading
cpio: Out of phase; resyncing.
Thanks,
Francisco
3 REPLIES 3
Anthony Goonetilleke_1
Regular Advisor

Re: cpio hp ux

This might be too obvious but what about man cpio
If this is not what your after try www.docs.hp.com
Sy-hoang Truong_1
Occasional Advisor

Re: cpio hp ux

Hello,
I am working on hp-ux for many years. I never understand and use cpio
sucessully instead of tar or fbackup. It is really a cloudy for me.

If someone understand them. Please give us three easy command :

1) backup files or dierectories on tape
2) read the contain of tape
3) restore data from tapes into other directories

Thanks
Terja Lange_1
Frequent Advisor

Re: cpio hp ux

With cpio I tend to use the same set of parameters going in and out of tape.

To write to tape

cd to target directory
# cd /tmp
# find . -print | cpio -ocdumvB > $(tapedevice}

to read from tape (index only
# cpio -itcB < ${tapedevice} > /tmp/index.out

nb it does read the entire tape, there is no index
at the beginning of tape like there is in fbackup

TO restore to other directories

WILL DEPEND ON HOW THE TAPE WAS WRITTEN.
if the silly person did hardcoded pathnames from /
you cant do it, if they did relative using a .
you can recover. Just cd to the target directory.
It will build up an index.

Good points

Keeps permissions except for files with owner/group
uids greater than 64K

Will create sub directories, thus great for relocating filesystems.

Uses less cpu than tar or cp

Bad points
if you dont backup relative you cannot change the restore directory

remembering the litany of variables.


i - input copying in
c - character sync (if you get out of phase drop this)
d - traverse directories
u - keep ownership
m - keep modification time
v - verbose , list files

0 - ouitput write somewhere

t - table of contents

B - blocking factor of 512 k
FInal hint

use cpio -ocdumvC800

when writing to tape, will give a considerably higher
thruput, but you must change your tape block size to
4096k.


u