1834935 Members
2345 Online
110071 Solutions
New Discussion

pax

 
SOLVED
Go to solution
fizan
Super Advisor

pax

i have taken a backup using a tar , now i need to restore it to the same machine but to different directory
tar -xvf or pax will work out.
explain me

Thanks
4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: pax

You need to use pax with -s:
pax -v -r -f foo.tar '-s:old-dir:new-dir:'
fizan
Super Advisor

Re: pax

dennis,

my source is :: /dev/rmt1
destination :: /rman/rmanbkp

the files inside the tape belongs to oracle owner and group is oinstall group.

can you explain me in this scenario.
Steven Schweda
Honored Contributor

Re: pax

> explain me

You first. What's in your "tar" archive?

tar tvf [...]

If you use a relative directory specification
instead of an absolute one when you _create_
the archive, then this is easier. For
example:
cd /opt ; tar cf /xxx.tar .
or:
cd / ; tar cf /xxx.tar opt
not:
tar cf /xxx.tar /opt
Dennis Handly
Acclaimed Contributor
Solution

Re: pax

>my source is: /dev/rmt1
>destination: /rman/rmanbkp

What is the path you archived?
pax -v -r -f /dev/rmt1 '-s:/old-dir:/rman/rmanbkp:'