- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restoring fun with tar
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:08 PM
тАО05-16-2002 12:08 PM
Restoring fun with tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:15 PM
тАО05-16-2002 12:15 PM
Re: Restoring fun with tar
I've never tried to restore a tar archive backed up using absolute path to a different location. Had tried long time back and was unsuccessful. Try this link and look at the suggestions from harry and james,
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x38d6cf38d6bdd5118ff10090279cd0f9,00.html
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:17 PM
тАО05-16-2002 12:17 PM
Re: Restoring fun with tar
Unfortunately tar doesnt let go the way is was backed up , so if the path it was written was /data.backup , it will restore it as /dat.backup only . There are two ways to overcome this .
1. Store it with the absulte path if you can do it on the legacy systems , ie either use /app/data or just th files under this directory .
cd /app/data
tar cvf /dev/rmt/0m *
and then resoter it by going unde/app/data and then doing a tar xvf .
Or the harder way is to restore it /data.backup and then move the files.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:17 PM
тАО05-16-2002 12:17 PM
Re: Restoring fun with tar
The option you specifically need to look at is the '-s' option to pax.
There are examples towards the end of the man page on how to use the '-s' option when restoring files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:20 PM
тАО05-16-2002 12:20 PM
Re: Restoring fun with tar
Check this link & Harry's suggestion of using pax to get around the absolute path tar problem:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x38d6cf38d6bdd5118ff10090279cd0f9,00.html
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:32 PM
тАО05-16-2002 12:32 PM
Re: Restoring fun with tar
http://hpux.cs.utah.edu/
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:34 PM
тАО05-16-2002 12:34 PM
Re: Restoring fun with tar
cd /app
ln -s data data.backup
tar -xvf /dev/rmt/0m data.backup
rm data.backup
Elegant and simple? Or doomed to failure. Points for opinions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:36 PM
тАО05-16-2002 12:36 PM
Re: Restoring fun with tar
pax -rv -s'/^\///' < /dev/rmt/0m
(Assuming your tape drive is /dev/rmt/0m)
This will restore the archive relative to your current directory location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:37 PM
тАО05-16-2002 12:37 PM
Re: Restoring fun with tar
Was it created with the directory specified as /data.backup or ./data.backup?
There is a VERY BIG difference.
If it was created with /data.backup then you could possibly create a link from /data.backup to /app/data.
If it was created with ./data.backup then the scenario you outlined may work.
As with many things in Unix. It depends.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:52 PM
тАО05-16-2002 12:52 PM
Re: Restoring fun with tar
Like Partick said it depends on how it was stored. Also if both the paths are under the same mounpoint possible you can just mv it after the restore.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2002 12:56 PM
тАО05-16-2002 12:56 PM