OracleDB‎ > ‎

RMAN

Oracle database rman

RMAN Recovery

RMAN> list backup of database;
(get the tag of the full backup you want then run)
RMAN> shtudown immediate
RMAN> startup mount
RMAN> RESTORE DATABASE FROM TAG <tag of the full backup>
RMAN> RECOVER DATABASE FROM TAG <tag of the full backup>
RMAN> ALTER DATABASE OPEN;

To make a full backup in rman:

configure controlfile autobackup ON;
run {
allocate channel d1 type disk;
backup current controlfile format '/u01/bak/control_%n_%T_%s_%p.bus';
backup full database format '/u01/bak/rman_%n_%T_%s_%p.bus';
}

Now if rman is in nocatalog mode, the information about the backup is in the control file(s). So we need to backup the spfile and the control files in order to be able to start the database in case it gets destroyed.

restore the spfile and the control files to the right places then start the database in mount mode:

SQL> startup mount

then in rman do the following:

rman target /
RMAN> restore database;
RMAN> recover database until logseq xxxx; (where xxx is The latest archivelog known by RMAN +1)


Important RMAN Backup Options

RMAN> configure backup optimization on;
RMAN> configure controlfile autobackup on;
If backing up to NFS, mount with following options

mount -o rw,bg,intr,hard,timeo=600,wsize=32768,rsize=32768 192.168.0.2:/opt/bak /opt/bak




Comments