System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

restore from gz file using cpio

SOLVED
Go to solution
'chris'
Super Advisor

restore from gz file using cpio

hi

I'm using cpio to backup /usr partition:

# cd / ; find ./usr -depth -print -xdev | cpio -ovfB | gzip -c > /mnt/save_usr.gz

Normally I can restore using:

cpio –ivdmlu < cpio file

but howto restore this partition from a gz file?
3 REPLIES
Laurent Menase
Honored Contributor
Solution

Re: restore from gz file using cpio

cd targetdir;gunzip

'chris'
Super Advisor

Re: restore from gz file using cpio

Thx a lot, it works well.

Dennis Handly
Acclaimed Contributor

Re: restore from gz file using cpio

Or use pax(1):
cd targetdir
gzcat /mnt/save_usr.gz | pax -r -v