Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAR headache

Status
Not open for further replies.

fraze

Technical User
Jul 17, 2001
8
0
0
GB
We're moving Oracle from one AIX machine to another but the directory structures are slightly different and I'm having problems untar'ing to the new structure.
I took an archive by running tar cvfp - /ORA/app/oracle/oraInventory but want to restore them to /app/oracle not /ORA/app/oracle - how can I do this?

Thanks in advance,

Fraze
 
You could try using pax. See Thread52-561583 for a discussion. Cheers.
 
Hi Fraze,
you can use pax command instead tar to do what you want.
pax -r -v -s */ORA/app/oracle*/app/oracle* -f <your_archive>
Best regards Boris
 
It's an extra step, but you could just rename the path using the &quot;mv&quot; command after restoring the tar.
 
What you want to do is to tar the files in the sub-directory

So cd to the directory:

cd /ORA/app/oracle/oraInventory

tar -cvf foo.tar ./*

Then cd to the directory where you want to untar

cd /app/oracle

tar -xvf foo.tar


Greg
 
Thanks for the help - got it sorted now
 
Just as a side note, I did this a short while back and used vgsave vgbackup & mksysb

--
| Mike Nixon
| Unix Admin
|
----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top