1819681 Members
3499 Online
109605 Solutions
New Discussion юеВ

restore function

 
Ragni Singh
Super Advisor

restore function

Hello all,

I have used the dump command to backup data to a tape but am in a big dilemma now. How can I use the restore option to restore a particular dir from tape. I would like to restore /var/opt/testing from tape. Any help is greatly appreciated and points will be assigned.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: restore function

You have to use the dd command to read from /dev/rmt/0m

Example threads
http://search.hp.com/redirect.html?url=http%3A//forums1.itrc.hp.com/service/forums/questionanswer.do%3FthreadId%3D236549&qt=dd+%2Bscript&hit=3

http://search.hp.com/redirect.html?url=http%3A//forums1.itrc.hp.com/service/forums/questionanswer.do%3FthreadId%3D66591&qt=dd+%2Bscript&hit=1

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ragni Singh
Super Advisor

Re: restore function

Your response doen't help. I have a dir that I backed to tape using teh dump command. I now need to restore that same file and just need to know how it should be done. Thanks for your help.
Sridhar Bhaskarla
Honored Contributor

Re: restore function

Sanjay,

I used dump long time back. So, I am dependent on the man pages now.

With -x option, you should be able to restore an individual directory. The man page of 'restore' says

//

x Extract the named files from the tape. If the named file
matches a directory whose contents had been written onto
the tape, and the h modifier is not specified, the
directory is recursively extracted. The owner,
modification time, and mode are restored (if possible). If
no file argument is given, the root directory is extracted,
which results in the entire contents of the tape being
extracted, unless h has been specified. //

What is the problem you have?

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Leif Halvarsson_2
Honored Contributor

Re: restore function

Hi,
I never uses dump/restore myself but a look at the man page says you should use the x option. See man page for restore.
Ragni Singh
Super Advisor

Re: restore function

I have a file on tape. I need to resotre that file which is on a tape to /tmp dir. Thanks for all your help.
Ragni Singh
Super Advisor

Re: restore function

This is what I keep getting..

# restore -x /etc/hosts
Note: Doing Quad swapping
You have not read any tapes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Chris Watkins_1
Respected Contributor

Re: restore function

It should, after that point, say
"Specify next volume #:"

At which point, if you don't know which tape the file is on,
you will enter "1" (without quotes) then press enter.

Note that you may want to try without specifying the path:

# cd /desired_directory_here
# restore -xv name_of_file
(Enter 1 when it asks for volume number, then y for next question)



If that doesn't work, see if the path is different than "./"


# restore -tv |grep name_of_file



Not without 2 backups and an Ignite image!
Ragni Singh
Super Advisor

Re: restore function

thanks for all your response. I managed to get it to finally work.