Link to home
Start Free TrialLog in
Avatar of dayiku
dayiku

asked on

How can i restore a Hot backup?

I am exploring options for database backup and recovery for oracle. I implemented a cold backup and was able to restore it successfully, however i have not been able to restore the Hot Backups i took.
Is there a way i can do this and if so how can i do it?


Thanks.
Avatar of seazodiac
seazodiac
Flag of United States of America image

All you need to do is turn on the ARCHIVELOG MODE.

in the init.ora file you need to have these lines:

LOG_ARCHIVE_START=true
LOG_ARCHIVE_DEST=</path/to/archivefiles>
LOG_ARCHIVE_FORMAT= %s_%t.arc


Then save your init.ora file and

STARTUP your database in the mount mode.
SQL> STARTUP MOUNT EXCLUSIVE

SQL>ALTER DATABASE ARCHIVELOG;

SQL> shutdown immediate;

do a possible full database backup.
then restart the database
SQL>STARTUP

then your database will start in archivlog mode from now on.

From there,  anytime you want to do a hot backup you can issue.

SQL>alter tablespace <ts_name> begin backup;
SQL>host  cp <datafile_path> <a new location>
SQL>alter tablespace <ts_name> end backup;

that's all. it's advisable to do the hotbackup one tablespace after another.
Avatar of Kong
Kong

"however i have not been able to restore the Hot Backups i took."

What kind of restore are you trying to do? Full database restore or point it time? Your cold backup would have restored it to when it was backed up, any changes after would have been lost. Hot backup would cover all changes made after backup (provided you haven't lost the archive logs & unarchived redo logs).

Follow seazodiac's advice on procedure.

Avatar of dayiku

ASKER

I know how to take a hot backup, i am trying to restore it now, can you give me some information on that?
ASKER CERTIFIED SOLUTION
Avatar of Kong
Kong

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dayiku

ASKER

Thanks for your help. I am using oracle 8i.
I'll try this now.
No problem. Let us know if you're still having problems.

K