Operating System - HP-UX
1836882 Members
2120 Online
110111 Solutions
New Discussion

extract 1 file out of ignite archive.

 
Richard Pereira_1
Regular Advisor

extract 1 file out of ignite archive.

Hi,

Im in dire need to extract 1 file and all i have to work with is a make_net_recovery archive. I know its a easy thing to do on tape archives;

mt -t /dev/rmt/0mn fsf 1
tar -xvf /dev/rmt/0m filename
but how do i do this with a archive on a ignite server? can it be done?

Thanks in adv.
Richard
18 REPLIES 18
Wilfred Chau_1
Respected Contributor

Re: extract 1 file out of ignite archive.

try this

gzcat |tar -xvpf

should not have a leading /.

Richard Pereira_1
Regular Advisor

Re: extract 1 file out of ignite archive.

gzcat 2005-03-04,03:00 |tar -xvpf passwd
2005-03-04,03:00: Unknown error
tar: cannot open passwd


gzcat "2005-03-04,03:00" |tar -xvpf /etc/passwd
2005-03-04,03:00: Unknown error
Tar: tape blocksize error

what would be an exemple syntax?
Patrick Wallek
Honored Contributor

Re: extract 1 file out of ignite archive.

You just need to modify your command slightly:

# gzcat archive_name | tar -xvf - etc/passwd

Note 2 things: 1) Ther '-' after the 'f' option and there ARE SPACES surrounding the dash so it is 'tar -xvf-' and 2) there is NO leading / in the file name. To see the list of files in the archive do:

# gzcat archive_name | tar -tvf -
Richard Pereira_1
Regular Advisor

Re: extract 1 file out of ignite archive.

must be Murphy working behind my back....
it still not working

gzcat 2005-03-04,03:00 | tar -tvf -
2005-03-04,03:00: Unknown error
Tar: blocksize = 0; broken pipe?
Richard Pereira_1
Regular Advisor

Re: extract 1 file out of ignite archive.

i also tried an exemple from kmine that suggests

gzcat 2005-03-04,03:00 | pax -r -f - etc/passwd
2005-03-04,03:00: Unknown error
pax: The archive is empty.
Goujon_1
Occasional Advisor

Re: extract 1 file out of ignite archive.

Try this
gunzip < archive_name | tar xvf - etc/passwd
It should work
wayne_104
Regular Advisor

Re: extract 1 file out of ignite archive.

hi Richard

try this
# mt -t /dev/rmt/0mn fsf 1
// This will jump over the boot part
# tar -xvf /dev/rmt/0m filename
Cheryl Griffin
Honored Contributor

Re: extract 1 file out of ignite archive.

tweak your command a bit:
# cd /var/opt/ignite/recovery/archives/hostname_here
# gzcat ./2005-03-04,03:00 | pax -r -f - etc/passwd

Note the ./ in front of the archive and the lack of the slash in from of /etc/passwd
"Downtime is a Crime."
John P. Kole
Frequent Advisor

Re: extract 1 file out of ignite archive.

I believe the problem here is that your archive is larger than the 2-gigabytes (2,147,483,647 bytes) and the standard shipped gunzip/gzip/gzcat (which are all the exact same utility) do NOT support files larger than 2-gigabytes on HP-UX. If this is the case, you will need to do something like:

# cat 2005-03-04,03:00 | gunzip | pax -tf - | head -5
./
lost+found/
etc/
etc/group
etc/passwd

Good luck,
jpkole


PS: Some related links on the 2-gigabyte issue:

Some myths about gzip 1.2.4 from Oct-2004:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=713940

More gzip notes from Jan-2004:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=397889

More notes on gzip from Jan-2004:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=388010
What could possibly go wrong?
Jose Javier Sianes Ruiz
Frequent Advisor

Re: extract 1 file out of ignite archive.

And dd have the same problems with large files like gzip? Im trying to make a bootable tape recovery from a make_net_recovery and allways get an I/O error:

root@igniteUXServer:/var/opt/ignite/clients/klax/recovery/latest> ll /var/opt/ignite/recovery/archives/klax/2005-03-10,11:37
-rw------- 1 bin sys 2567972913 Mar 10 12:38 /var/opt/ignite/recovery/archives/klax/2005-03-10,11:37
root@igniteUXServer:/var/opt/ignite/clients/klax/recovery/latest> es/klax/2005-03-10,11:37 of=/dev/rmt/0mn obs=2k <
I/O error
3219464+0 records in
804865+1 records out
root@igniteUXServer:/var/opt/ignite/clients/klax/recovery/latest>
Richard Pereira_1
Regular Advisor

Re: extract 1 file out of ignite archive.

well i thought i was ok with the latest PAX patch, but i ended up solving this buy installed the freeware version of gunzip (my archives are larger than 2gigs) after that the command worked flawlessly. Thanks for the help.

Richard
Richard Pereira_1
Regular Advisor

Re: extract 1 file out of ignite archive.

this is what i downloaded http://hpux.cs.utah.edu/hppd/hpux/Gnu/gzip-1.3.5/
installs it in a different path than the one shipped with HP
Jose Javier Sianes Ruiz
Frequent Advisor

Re: extract 1 file out of ignite archive.

Im using HP gunzip with pax patches and the command suggested:

# cat 2005-03-10,11:37 | gunzip | pax -tf - | head -5

Works perfectly, so it cuould be a gunzip problem in my case. My image file is 2.5GB large and with two different tapes (and passing a cleanning cartridge between) it allways fails in the same record:

root@igniteUXServer:/root> ll ./2005-03-10,11:37
-rw------- 1 bin sys 2567972913 Mar 10 12:38 ./2005-03-10,11:37
root@igniteUXServer:/root> cat 2005-03-10,11:37 | gunzip | pax -tf - | head -5
stand/
stand/lost+found/
stand/ioconfig
stand/bootconf
stand/system
root@igniteUXServer:/root>
root@igniteUXServer:/root>dd if=./2005-03-10,11:37 of=/dev/rmt/0mn obs=10k
I/O error
3190420+0 records in
159520+1 records out
root@igniteUXServer:/root>

Help will be very apreciated. Thanks.
Jose Javier Sianes Ruiz
Frequent Advisor

Re: extract 1 file out of ignite archive.

Also, making a dd to /dev/null works perfectly:

root@igniteUXServer:/root> dd if=./2005-03-10,11:37 of=/dev/null obs=10k
5015572+1 records in
250778+1 records out
root@igniteUXServer:/root>

What happends here?
RolandH
Honored Contributor

Re: extract 1 file out of ignite archive.

NO POINTS PLEASE !!


The main question here is:

Why does HP still deliver binaries that can not handle files larger than 2GB?

Some examples are tar gzip dd. etc etc etc

Even in the newest releases of HP-UX.

That is the real problem. And a lot of threads here in this forum are based on this problem.

Roland

Sometimes you lose and sometimes the others win
Jose Javier Sianes Ruiz
Frequent Advisor

Re: extract 1 file out of ignite archive.

My gzip/gunzip are HP signed and support perfectly largefiles, so in my oppinion your problem is a system not correctly updated.
Patrick Wallek
Honored Contributor

Re: extract 1 file out of ignite archive.

OK, just a point here -- Yes there are tools that can't handle 2 GB or larger files. That limitation goes back to BOUT (Beginning of Unix Time) when things were designed with MUCH MUCH MUCH smaller files in mind.

BUT, you must also consider now that HP-UX has PLENTY of tools that CAN handle files larger than 2 GB. A patched tar & pax can go read files up to 8GB, fbackup works wonderfully on large files, dd has no issue with large files that I know of since it just reads blocks and has no real concept of files. The gzip that HP ships with HP-UX is technically only intended for use with crash dumps I believe.

There are plenty of alternatives to all the tools mentioned as well. All the GNU* tools work really well.

RolandH
Honored Contributor

Re: extract 1 file out of ignite archive.

OK Ok - it became better and better with the largfile support of HP binaries.
But one of the embrassing moments for HP is that the mkisofs binary that was delivererd with the dvd-rw-tools(v.5.18) software, which is available from HP Software depot can NOT deal with files larger than 2GB.

"knock knock - Hello MC Fly - sombody home."

I think nobody has told HP that a DVD is able to store more than 2GB.

Roland
Sometimes you lose and sometimes the others win