- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Restoring from TAR... directory problems
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
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
06-21-2002 12:33 PM
06-21-2002 12:33 PM
Alright, I'm back again with my 'tales of woe'. Still maintaining HP-UX 8.0 systems, and they're starting to get old. Recently had a(nother) disk fail, boot-drive, and am in the process of trying to recover from backups.
No, they're not paper tapes. :-)
They aren't much better, though; the whole root disk was put on a DAT using the command "tar -cvf /dev/rmt/0m /"
The bugger of that is this: I now have a replacement disk with a filesystem on it, and have connected it to another machine with a DAT drive in the hopes of recovering from the DAT onto the new HD... but when I try and get the stuff off the tape, it doesn't want to put it in on the shiny *new* disk. Oh no, it wants to overwrite the complete O/S on the machine it's hooked up to!
A 'tar -tvf' on the backup tape produces the following results:
rwxr-xr-x 0/0 0 Dec 7 15:33 1998 //
rw-rw-rw- 0/3 0 Aug 29 14:35 1992 //.x11startlog
rwxr-xr-x 0/1 1340935 May 17 14:37 1993 //hp-ux
rwxr-xr-x 0/0 0 Feb 7 14:57 1992 //lost+found/
rwxr-xr-x 0/0 0 Sep 6 00:39 1996 //dev/
rw--w--w- 202/20 0 Sep 6 00:49 1996 //dev/syscon
rw------- 0/3 0 Feb 11 15:32 1992 //dev/lan0
rwxr-xr-x 0/0 0 May 25 11:01 1993 //dev/dsk/
rw-rw-rw- 0/3 0 Nov 11 00:39 1992 //dev/dsk/0s0
rw-rw-rw- 0/3 0 Jul 21 11:03 1995 //dev/dsk/2s0
rw-rw-rw- 0/3 0 Jun 29 18:08 1993 //dev/dsk/6s0
[etc. etc. for a long way]
As you can see, the path in all cases is prefaced by //, so the un-tar is trying to put this stuff in the root directory.
Here's the question: is there any way to tell tar (especially this older version) *NOT* to try and overwrite /hp-ux and /dev and /etc and everything else, but to put all that output into _this_ directory?
Corollary: is there a way to set / to anything other than the root disk? If so, I could link that to the new disk, and I'd be fine. (I don't think so, but I'm working laterally here.)
Finally, when this is all done, I'd like to get newer, better backups. (These were all done for Y2K preparation. Still pretty much the same since then, mind, but doesn't hurt.) Given that I don't have fancy tools like Ignite on this old system (but neither do I have the hassles of lvols), what's peoples' suggestions about the best way to go about it?
Thanks for reading this far, and for any help you can give.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 12:46 PM
06-21-2002 12:46 PM
Re: Restoring from TAR... directory problems
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 12:47 PM
06-21-2002 12:47 PM
Solution'pax' can be used to circumvent extracting a tar tape written with absolute paths. Try this:
# /sbin/pax -r -p e -s ',/,/newdir/,' -f /dev/rmt/0m
This will extract the root directory into /newdir preserving permissions and ownership.
I'm not sure if 'pax' existed for 8.0.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 01:14 PM
06-21-2002 01:14 PM
Re: Restoring from TAR... directory problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 01:24 PM
06-21-2002 01:24 PM
Re: Restoring from TAR... directory problems
I don't think pax was available for v8. (v8! Jeesh, I didn't think those things still existed - it's like finding a living dinosaur!)
:-)
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 01:31 PM
06-21-2002 01:31 PM
Re: Restoring from TAR... directory problems
tar -xvf [arch1] | tar cvf [arch2]
Then tar tvf [arch2] and see what you get..
Regards,
Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 01:37 PM
06-21-2002 01:37 PM
Re: Restoring from TAR... directory problems
==========
Martin - No CD for me. These were installed from DAT originally, and have no CDs attached. It might be possible to get one, but it'd be a _lot_ more work than I'd like to go through. (I forgot to mention that I'm doing this all remotely: computers are in Britain and I'm in Canada.)
==========
James - Pax, you say? Never heard of it. Hrm... lemme check.
acsesys romeo 23: which pax
/usr/bin/pax
acsesys romeo 24: uname -a
HP-UX romeo B.08.00 A 9000/380 080009181847
Yup, I've got it, even way back when on an 8.0 Martin. :-)
This certainly looks promising, at the very least; it seems like it could do what I want. Dissecting your command line, I can figure what the -p, -s and -f are for... what's the 'e', and why am I using only -r and not -rw?
(I tried running this command line, BTW, substituting "/acse/tmp/rnew/" for "/newdir/" just to see if it'd work, and slapping a -v on the end. After 30 minutes, still no output. Am I doing something wrong?)
Anyway, definitely worh investigating. Thanks for a new tool in my bag of tricks.
==========
Arockia - Excellent suggestion; I should have known that GNU would have more utility than the default. :-) URL, if you'd be so kind? I don't know if I can get one working on 8.0, but I do have a couple of 9.0 machines on that lan (with DAT drives), so perhaps I can can compile it there if there aren't any binaries to be found.
==========
Thanks again for the excellent and timely advice. Always great to come here when I'm out of ideas and be handed a few more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2002 02:03 PM
06-21-2002 02:03 PM