1825766 Members
2106 Online
109687 Solutions
New Discussion

Re: cpio

 
SOLVED
Go to solution
Edwin Ruiz_2
Super Advisor

cpio

Hi!

I want to backup files to tape using cpio command. what is the sintaxis for this command for backup and restore???

Thanks for ur hlep!
5 REPLIES 5
Stephen Keane
Honored Contributor
Solution

Re: cpio

find (whatever) | cpio -ocBv > /dev/rmt/??

to backup

cpio -icBvdmu << /dev/rmt/??

to restore

Sanjay_6
Honored Contributor

Re: cpio

Hi Edwin,

Take a look at this chapter,

http://docs.hp.com/en/B2355-90672/ch09.html

We do not use cpio now-a-days because of certain limitation on the size of files it can handle. On hp-ux fbackup/frecover is more often used than cpio at present.

Hope this helps.

Regds
Edwin Ruiz_2
Super Advisor

Re: cpio

thakns Stephen
Stephen Keane
Honored Contributor

Re: cpio

Note that should be

cpio -icBvdmu < /dev/rmt/??

Not:

cpio -icBvdmu << /dev/rmt/??


Bit of finger trouble there.
A. Clay Stephenson
Acclaimed Contributor

Re: cpio

Depending upon the tape drive, you can often see huge performance gains by reblocking cpio via dd.

So to add this layer:

find (whatever) | cpio -ocBv | dd ibs=5k obs=200k of=/dev/rmt/??

to backup

dd if=/dev/rmt/?? ibs=200k obs=5k | cpio -icBvdmu

to restore

The 'B' cpio option specifies 5K blocking so leave those alone but play the the 200k blocking to get overall highest throughput. It should be an integral multiple of 5k.
If it ain't broke, I can fix that.