English flagItalian flagGerman flagSpanish flagFrench flagPortuguese flagJapanese flagKorean flagChinese flagRussian flag
By N2H
Home » Tips » cpio tutorial

cpio tutorial

    cpio

The cpio command deals with the standard input so file system paths must be piped to it:
# Create archive.

cd /u01/app/oracle find admin | cpio -oc > /tmp/admin.cpio
# Restore archive.

cd /tmp cpio -idmv /tmp/admin.cpio

find archived | cpio -oc | ( rsh hostx-0165 “cd /app/das; cpio -idmuv” )
copied the contents of /var/adm to the /vxfs file system and ran the following command
# vxdump 0f - /vxfs | (cd /ufs; vxrestore xf - )
The data was copied from /vxfs to /ufs just fine! So then I tried the reverse. I cleaned out /vxfs and ….
# ufsdump 0f - /ufs | (cd /vxfs; ufsrestore xf - )
Once again success. So the next would be if a vxdump is written to tape would it restore to a UFS file system. I used vxdump to write out the /vxfs file system to /dev/rmt/0 and then cd /ufs and issued vxrestore and all the data was restored to the UFS file system successfully!
# vxdump 0f /dev/rmt/0 /vxfs # cd /ufs # vxrestore xf /dev/rmt/0
One last test using ufsdump to tape and I found this also worked just fine.
# ufsdump 0f /dev/rmt/0 /ufs # cd /vxfs # ufsrestore xf /dev/rmt/0