Operating System - HP-UX
1751977 Members
4541 Online
108784 Solutions
New Discussion юеВ

how to copy 1 file from the backup done via make_net_recovery ?

 
SOLVED
Go to solution
DnD_1
Regular Advisor

how to copy 1 file from the backup done via make_net_recovery ?

hi guys,

how do i copy only 1 file from the backup which done via make_net_recovery ?

the ignite backup is located in the other server...

pls guide..many thanks!!




5 REPLIES 5
Patrick Wallek
Honored Contributor
Solution

Re: how to copy 1 file from the backup done via make_net_recovery ?

Go to the Ignite server and locate the make_net_recovery backup file.

When you find the file do:

To get a list of files:
# gzcat | tar -tvf -

Say you want to restore the /etc/hosts file:

# gzcat | tar -xvf - etc/hosts

Make careful note of the spacing required above. In the first command there is a space between the 'tvf' and the last '-'.

In the 2nd command there is a space between 'xvf' and the '-' and between the '-' and the file name.

Also note the there is NOT a leading '/' in the file name you want to restore.

When the file is restored it will recreate the directory structure for the file **in the directory you issue the command from**. This is because of the lack of the leading '/' in the file name (the relative path) and all files were stored relative to the '/' directory.

Once you have restored the file you will have to copy it to the server you want.
likid0
Honored Contributor

Re: how to copy 1 file from the backup done via make_net_recovery ?

Here you have some examples:

Assume I have an archive:
$ archive=/var/opt/ignite/archives/iux11i32bit.gz

And I want to extract this file from it:
$ NameNarc=opt/hpws/util/ports.sh

I check to be sure the file is in the archive:
$ gzcat iux11i32bit.gz | tar -tvf - | grep ${NameNarc}
r-xr-xr-x 2/2 8094 Oct 9 16:56 2004 opt/hpws/util/ports.sh

I want to extract the file into a temporary location and with a different name:
$ NameNtmp=/tmp/dog.sh

So I use the following command:
$ gzcat ${archive} | pax -s,${NameNarc},${NameNtmp}, -rvf - ${NameNarc}
USTAR format archive
/tmp/dog.sh

And now, I have my original file from the archive in a new location, with a new name:
$ ls -aol ${NameNtmp}
-r-xr-xr-x 1 jpkole 8094 Oct 9 2004 /tmp/dog.sh

http://www.hpuxtips.es/?q=node/35
Windows?, no thanks
DnD_1
Regular Advisor

Re: how to copy 1 file from the backup done via make_net_recovery ?

thanks guy.

but our image file something like this

-rw----- 1 nobody sys 7634932883 Mar 26 14:05 2009-03-26, 12:26

its no zip or tar..
Richard Hepworth
Esteemed Contributor

Re: how to copy 1 file from the backup done via make_net_recovery ?

that is still a gzipped tar file (just doesn't have the extension), try the suggestions above, they will work.
Patrick Wallek
Honored Contributor

Re: how to copy 1 file from the backup done via make_net_recovery ?

>>its no zip or tar..

Yes it is. It may not have '.gz' extension but it is still a gzip'ed tar file. That is how Ignite creates those images.