Operating System - HP-UX
1855859 Members
1659 Online
104107 Solutions
New Discussion

Restore single folder from Ignite-Image

 
SOLVED
Go to solution
dark-sun
Frequent Advisor

Restore single folder from Ignite-Image

Hello,
I had a Ignite-Image from a server, and now need to restore a single folder from this archive.

I find out , that I had to use #gzcat to look into the archive.

But what will be the correct syntax to restore a whole folder, f.e. located in "//*"

(The restored directory can be stored in original place ("/"))

Thx in advance

4 REPLIES 4
Richard Hepworth
Esteemed Contributor
Solution

Re: Restore single folder from Ignite-Image

Hi,

Mount the recovery image on your server, then:

cd /

gzip -dc / | tar xvf -

This will restore the directory into it's original location.

regards,

Richard
Dennis Handly
Acclaimed Contributor

Re: Restore single folder from Ignite-Image

>what will be the correct syntax to restore a whole folder, u.e. located in "//*"

gzcat archive.gz | tar -xvf - /

You may have to experiment, that leading "/" may be missing. To get an idea, use:
gzcat archive.gz | tar -tvf - | head
dark-sun
Frequent Advisor

Re: Restore single folder from Ignite-Image

Thanks a lot, it worked!

Only:
# gzip -dc archive | tar xvf -
works fine,

# gzcat archive | tar -xvf -
had restored only a empty diretory !?


Best regards
Dennis Handly
Acclaimed Contributor

Re: Restore single folder from Ignite-Image

# gzcat archive | tar -xvf -
had restored only a empty directory!?

This assumes you have gzcat and that it works the same way as "gzip -dc".