12-23-2003 03:51 AM - last edited on 12-22-2013 06:38 PM by Lisa198503
How can I restore just one file from a make recovery tape?
P.S. This thread has been moved fromHP-UX>System Administration to HP-UX > ignite. -HP Forum Moderator
Solved! Go to Solution.
12-23-2003 04:13 AM
You'll need the full path to that file
tar xvf /dev/rmt/0mn /full/path/to/filename
12-23-2003 07:49 AM
# mt -t /dev/rmt/0mn fsf 1
# tar xvf /dev/rmt/0mn etc/hosts
File will be restored relative to cwd.
01-19-2006 04:19 AM
What if I do
# cd /tempdir
# tar xvf /dev/rmt/0mn
will I restore everithing under /tempdir
without overwriting files under / ?
01-19-2006 04:37 AM
Yes, you are correct. Since there is no leading '/' on files on the make_tape_recovery tape, the directory structure would get created in your '/tempdir'.
Just be sure /tempdir is large enough to handle ALL of the VG00 files.
01-19-2006 07:57 PM
# tar tvf /dev/rmt/0mn
and at the beginning I got this two files with the leading /
rw-r--r-- 0/3 2418 Sep 11 12:32 2005 /etc/passwd
rw-r--r-- 0/3 399 Sep 11 12:32 2005 /etc/group
then they come out again among the others without the leading /
rw-r--r-- 0/0 399 Sep 11 12:32 2005 etc/group
rw-r--r-- 0/0 2418 Sep 11 12:32 2005 etc/passwd
Should I backup /etc/passwd, /etc/group on the restoring machine before "tar" over it?
12-19-2013 04:47 PM
I typed in the following command from HP support
tar -xvf /dev/rmt/0mn .d1/CPD/SSMDIR
What I wan to happen is take the SSMDIR file from the tape device and put it in the d1/CPD directory on the HP 9000/800
Does not seem to work. I tried 4 backup tapes. I am at a loss.
Does the file need to be deleted first or will this command overwrite the existing file?
I am not a UNIX person, so be kind when responding.
12-19-2013 07:01 PM
>> tar -xvf /dev/rmt/0mn .d1/CPD/SSMDIR
>> Does not seem to work. I tried 4 backup tapes.
What is the result? Does the command run for a long time and then return with no output on the screen?
If that is the case, then the filepath you specified does not exist on the tape. You need to verify what has been stored on the tape by requesting a table of contents like this:
mt -f /dev/rmt/0mn rewind tar tvf /dev/rmt/0mn > /var/tmp/tapelist.txt
Then use vi to search the listing for SSMDIR.
If you're not familiar with vi, just use grep to search the listing like this:
grep SSMDIR /var/tmp/tapelist.txt
If nothing comes back, there is no SSMDIR file on the tape. You could expand the search to the CPD directory or the d1:
grep CPD /var/tmp/tapelist.txt
grep .d1 /var/tmp/tape
If nothing comes back, then the CPD or the .d1 directories were not backed up.