Operating System - HP-UX
1753797 Members
7000 Online
108799 Solutions
New Discussion юеВ

Re: Restoring files using pax_enh

 
Andrew Pollard
Super Advisor

Restoring files using pax_enh

Hi,

We have a RP8400 running hpux 11.23. We just recently moved from ftio as our back up solution to pax_enh due to the ftio 2GB file size limit. While performing a back up, we specify the full path, for example "/production/client/db", and with ftio, we were able to drop the first "/" and restore files where we were sitting without restoring to the original location. Unfortunately with pax_enh, we cannot figure out how to do this.

Does anyone know how to restore files to a current working directory and not the original?

Thanks

Andrew
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Restoring files using pax_enh

Hi Andrew:

You simply use the '-s' option of 'pax' to strip the leading '/' and or path(es). See the manpages for 'pax'/

For example:

# pax -w -f /tmp/mypax /tmp/myfile
# cd /var/tmp && pax -r -s ',/tmp/,,' -f /tmp/mypax

Regards!

...JRF...
Andrew Pollard
Super Advisor

Re: Restoring files using pax_enh

Hi James,

I ran the following command but it still restores to the original file location:
pax_enh -rv -b 32768 -s ',/BCVu4//,,' -f /dev/rmt/18m

I want to be able to restore everything under BCVu4 into the directory I am currently sitting in. Is there something wrong with the command I ran?

Andrew
Andrew Pollard
Super Advisor

Re: Restoring files using pax_enh

Sorry, the command I ran only had 1 "/" at the end, not two:
pax_enh -rv -b 32768 -s ',/BCVu4/,,' -f /dev/rmt/18m
Dennis Handly
Acclaimed Contributor

Re: Restoring files using pax_enh

>I ran the following command but it still restores to the original file location:

I made a typo like that for pax(1) recently. Using -k will keep you from messing up, until you get your -s patterns straight.