Oct 06 2013

Oracle Cold-Offline Backup And Restore

Category: Administration,Backup And RecoveryFatih Acar @ 14:13

You have to shutdown database to take offline backup. After shutdown database, you can take backup with two way that are rman backup database or copy Data Directory that is include datafiles, redo log files and control files.

Offline-Cold Backup Database

1- Take Offline Backup With Rman

SQL> shutdown immediate;
SQL> startup mount;
RMAN> backup database;

2- Take Offline Backup With Copy Data Directory

#> cp /data/ /backup/
Note : this /data/ directory includes data files, control file and redo log files.

Restore Database From Offline-Cold Backup

1- Restore From Data Directory Copy

Install Oracle Software
Edit init.ora parameter file. That is in /dbhome/dbs/init.ora
Change values with Oracle base path and change db name parameter.
Change Memory Target
Add directory for not exists directories where pfile.ora. For example, diagnostic directory.
Connect Oracle Db sqlplus / as sysdba
SQL> create spfile from pfile=’/pathofparameterfile/init.ora’
SQL> startup;
Restore is completed.

2- Restore Database From Rman Offline Backup

Install Oracle Software
#> rman target /
rman> set dbid=123124123 //that is your db id. You can find from controlfile backup name, if you use %F contorolfile backup format.
rman> startup nomount force;
rman> restore spfile from ‘controlfilebackup_123124123.ctl’
SQL> create pfile=/tmp/pfile.ora’ from spfile;
#> vi pfile.ora
You have to configure pfile.ora for your new server path and memory. If not exist directories, you have to create.
SQL> create spfile from pfile=’/tmp/pfile.ora’;
SQL> shutdown abort;
SQL> startup nomount;
RMAN> restore controlfile from ‘controlfilebackup_123124123.ctl’;
SQL> alter database mount;
RMAN> list backup;
RMAN> restore database;
SQL> alter database open resetlogs;

Restore is completed.

35,679 total views, 5 views today

Tags: Database Administration, Oracle, Oracle Administration, Oracle Backup and Restore, Oracle Rman Backup

facebook comments:

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.