Operating System - HP-UX
1827680 Members
3233 Online
109967 Solutions
New Discussion

Extracting just /var from an Ignite/UX tape

 
SOLVED
Go to solution
Ted Buis
Honored Contributor

Extracting just /var from an Ignite/UX tape

From reading prior posts it seems possible to extract just /var from an Ignite tape. Can you confirm this? Can you help with the process? Many thanks in advance.

The system that I have been asked to recover is HP-UX 11.0. A disk in vg00 was lost that contained /var. The fbackups that were done only go thru /var/adm/sw/... on tape 1, but there are no tape 2's. The is an ignite tape that I would hope has /var on it.
Mom 6
11 REPLIES 11
James R. Ferguson
Acclaimed Contributor

Re: Extracting just /var from an Ignite/UX tape

Hi Ted:

This will work:

# mt -t /dev/rmt/0mn fsf 1
# tar -xvf /dev/rmt/0m "dirs_to_recover"

Note the no-rewind device for the tape positioning.

Regards!

...JRF...
Patrick Wallek
Honored Contributor
Solution

Re: Extracting just /var from an Ignite/UX tape

Also be aware that when the directories are stored on the tape, the leading "/" is ommitted. So to restore /var you would just specify var on the tar command line.

# tar -xvf /dev/rmt/?mn var

Be sure you are in the / directory when you do that.
Uday_S_Ankolekar
Honored Contributor

Re: Extracting just /var from an Ignite/UX tape

You can use these simple commands to resote either file or a directory from Ignite tape

# mt -t /dev/rmt/devname fsf 1 : This command moves the tape forward

# tar -xvf /dev/rmt/devname filename/directory : use the regular tar command

-USA
Good Luck..
Ted Buis
Honored Contributor

Re: Extracting just /var from an Ignite/UX tape

I was thinking
mt -f /dev/rmt/0m rew
mt -f /dev/rmt/0mn fsf 1 # space between fsf # and 1?
tar -xvf /dev/rmt/0m /var

I notice you used mt -t, which I think is just an old version of mt -f, true?

Many thanks.

Ted
Mom 6
Ted Buis
Honored Contributor

Re: Extracting just /var from an Ignite/UX tape

Thank you Patrick, as I would have just used /var.
Mom 6
James R. Ferguson
Acclaimed Contributor

Re: Extracting just /var from an Ignite/UX tape

Hi (again) Ted:

Yes the '-t' switch to 'mt' is the deprecated variation of '-f'. The 10.20 manpages use '-t' the 11i manpages show both.

Regards!

...JRF...
Ted Buis
Honored Contributor

Re: Extracting just /var from an Ignite/UX tape

Just as a test, I did this with "tar -tvf /dev/rmt/0m var", and it listed all the files on the ignite tape. Is this just a feature of "tar" that with the -t option it ignores and file designation?
Mom 6
James R. Ferguson
Acclaimed Contributor

Re: Extracting just /var from an Ignite/UX tape

Hi Ted:

I wouldn't expect 'tar' to be terribly rigorous in its switch and argument checking. The 't' "function key" in 'tar' lists the archive's contents in total. Clearly, the file (directory) argument is ignored and 'tar' doesn't complain. The man page synopsis is vague about whether you would expect this to be a usage error or not.

Regards!

...JRF...
Ted Buis
Honored Contributor

Re: Extracting just /var from an Ignite/UX tape

Well I tried this, but it didn't exactly work as expected.
"tar -xvf /dev/rmt/0m var" did extract the var files as I had desired, but even though I was in /, it put them in /root, so I have /root/var, which naturally filled / quickly. I am trying again, this time with $HOME equal to / rather than /root. I have not seen the -C option to tar used with an extract. Anyone know if, "tar -xv var -C /" would do it?
Mom 6
Ted Buis
Honored Contributor

Re: Extracting just /var from an Ignite/UX tape

Changing $HOME to be / (not /root) solved the problem.
Mom 6
Ted Buis
Honored Contributor

Re: Extracting just /var from an Ignite/UX tape

Thanks for the help. It worked.
Mom 6