Operating System - HP-UX
1834499 Members
2255 Online
110068 Solutions
New Discussion

backup with cpio and compress

 
SOLVED
Go to solution
karbach
Occasional Contributor

backup with cpio and compress

for our backup we use the following as command:

find / -print 2>>/home/backup/backup.err | cpio -oc 2>>/home/backup/backup.err | compress -v 2>>/home/backup/backup.err >/dev/ios0/rstape016

My question is :how can i use CPIO and UNCOMPRESS commands to restore a given file from the tape ?

I have used the following:
uncompress | cpio -icvmu but it gives me the following as error:
cpio: Bad header - checksum error.
cpio: Not a cpio file, bad header.

do you have any suggestion, it's urgent.
Thank you.


4 REPLIES 4
Klaus Crusius
Trusted Contributor
Solution

Re: backup with cpio and compress


try the following:


Klaus
There is a live before death!
Robin Wakefield
Honored Contributor

Re: backup with cpio and compress

You need something like:

zcat < /dev/ios0/rstape016 | cpio -icvmu

Robin.
Rainer von Bongartz
Honored Contributor

Re: backup with cpio and compress


1.) rewind your tape

mt rewind /dev/ios0/rstape016

2.) uncompress contents from tape and pipe to cpio
uncompress < /dev/ios0/rstape016 | cpio -icvdumB
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Ravi_8
Honored Contributor

Re: backup with cpio and compress

uncompress /dev/ios0/rstape016 |cpio -icvmu
never give up