Operating System - HP-UX
1747984 Members
4422 Online
108756 Solutions
New Discussion юеВ

Re: I need to restore just one file from a make recovery tape.

 
SOLVED
Go to solution
Fabricio_2
Occasional Advisor

I need to restore just one file from a make recovery tape.


How can I restore just one file from a make recovery tape?

Thanks,
Fabricio.

 

P.S. This thread has been moved fromHP-UX>System Administration to HP-UX > ignite. -HP Forum Moderator

8 REPLIES 8
Fabricio_2
Occasional Advisor

Re: I need to restore just one file from a make recovery tape.



I found it!

mt -t /dev/rmt/0mn fsf 1
tar -xvf /dev/rmt/0m filename
Jeff Schussele
Honored Contributor

Re: I need to restore just one file from a make recovery tape.

Hi Fabricio,

You'll need the full path to that file

tar xvf /dev/rmt/0mn /full/path/to/filename

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Tom Danzig
Honored Contributor
Solution

Re: I need to restore just one file from a make recovery tape.

Actually, the files are on the recovery tape without the leading slash. To recover /etc/hosts:

# mt -t /dev/rmt/0mn fsf 1
# tar xvf /dev/rmt/0mn etc/hosts

File will be restored relative to cwd.
paolo barila
Valued Contributor

Re: I need to restore just one file from a make recovery tape.

Hi all

What if I do

# cd /tempdir

# tar xvf /dev/rmt/0mn

will I restore everithing under /tempdir
without overwriting files under / ?
share share share
Patrick Wallek
Honored Contributor

Re: I need to restore just one file from a make recovery tape.

Paolo,

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.
paolo barila
Valued Contributor

Re: I need to restore just one file from a make recovery tape.

I tried

# 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

any idea?

Should I backup /etc/passwd, /etc/group on the restoring machine before "tar" over it?
share share share
DJD
New Member

Re: I need to restore just one file from a recovery tape.

Hello

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.

 

Thanks,

Dave

Bill Hassell
Honored Contributor

Re: I need to restore just one file from a recovery tape.

You wrote:

 

>> 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.

 

 



Bill Hassell, sysadmin