Re: I need to restore just one file from a recovery tape. (239 Views)
Reply
Occasional Advisor
Fabricio_2
Posts: 8
Registered: ‎01-15-2003
Message 1 of 9 (268 Views)
Accepted Solution

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

[ Edited ]


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

Occasional Advisor
Fabricio_2
Posts: 8
Registered: ‎01-15-2003
Message 2 of 9 (268 Views)

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
Honored Contributor
Jeff Schussele
Posts: 6,795
Registered: ‎02-18-2002
Message 3 of 9 (268 Views)

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!
Honored Contributor
Tom Danzig
Posts: 642
Registered: ‎12-20-1999
Message 4 of 9 (268 Views)

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.
Valued Contributor
paolo barila
Posts: 193
Registered: ‎03-31-2003
Message 5 of 9 (268 Views)

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
Honored Contributor
Patrick Wallek
Posts: 13,777
Registered: ‎06-21-2000
Message 6 of 9 (268 Views)

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.
Valued Contributor
paolo barila
Posts: 193
Registered: ‎03-31-2003
Message 7 of 9 (268 Views)

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
Occasional Visitor
DJD
Posts: 1
Registered: ‎12-19-2013
Message 8 of 9 (239 Views)

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

Honored Contributor
Bill Hassell
Posts: 14,210
Registered: ‎05-29-2000
Message 9 of 9 (224 Views)

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.

 

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.