Operating System - HP-UX
1752633 Members
5742 Online
108788 Solutions
New Discussion юеВ

Restoring from cold backup Oracle using cpio

 
Jade Bulante
Frequent Advisor

Restoring from cold backup Oracle using cpio

We have an Oracle database and I would like to find out if there is a step by step method or procedure of restoring from cold backup. I use the cpio command and has already a cron job to shutdown the database, back it up amd start it up. Please help. Just recovery, and nothing else.

Jade
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Restoring from cold backup Oracle using cpio

Since you did not mention the cpio options I can't be exact; but here goes.

1) As user oracle, svrmgrl
connect internal
shutdown
exit
if you have listeners running
lsnrctl
stop
exit

2) as root
cpio -ivdum < /dev/rmt/0m

(If you used the '-c' or -B' options add them to the command; if you reblocked using dd; add that command and pipe to cpio)

3) as oracle
svrmgrl
connect internal
startup
exit
If you are running listeners
lsnrctl
start
exit

That should do it assuming your backup was done correctly and that you are simply using default listeners.

BTW - I suspect you would have gotten more responses had you been more diligent is assigning points.

Regards, Clay
If it ain't broke, I can fix that.
Jade Bulante
Frequent Advisor

Re: Restoring from cold backup Oracle using cpio

Do I really have to stop the listener when backing??? I thought shutting down the database is fine..
A. Clay Stephenson
Acclaimed Contributor

Re: Restoring from cold backup Oracle using cpio

No, it's not absolutely neceassary to shutdown the listener unless you are also restoring the oracle executables. Wihout knowing your backup procedures, it's impossible to say for sure.

Normally, in the case of a cold restore, it makes sense to do this.
If it ain't broke, I can fix that.
Alexander M. Ermes
Honored Contributor

Re: Restoring from cold backup Oracle using cpio

Hi there.
Clay's procedure is ok so far. But bringing the listener down as last step gives you one advantage. You can cleanup the directory with the sockets ( /tmp.oracle ). Bring down the listener, do the backup, cleanup sockets, start listener and start database again.
If you do not clean your socket directory, you might end up in some trouble with extisting sockets after a few days or weeks.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Graham Cameron_1
Honored Contributor

Re: Restoring from cold backup Oracle using cpio

It's a small point but if you *are* shutting
down listeners you may need to start them up
again before you start your databases.
MTS (Multi-threaded Server) has dispatchers
which have to communicate with the listeners
at startup.
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.