Wednesday, March 9, 2011

RMAN Offline Backup Script

Offline Backups are needed when database is working in Noarchivelog Mode.
In this example we will use RMAN to backup database while it is offline.

Script:

D:\> rman target sys/manager as sysdba

RMAN> shutdown immediate;

RMAN> startup mount;

RMAN>
run {
allocate channel c1 device type disk
backup as compressed backupset full skip inaccessible
format 'D:\RMAN_BACKUP\Level0\bak_%s_%t_fullbackup.bak'
tag rman_Offline_full_backup
filesperset 10 (database include current controlfile);
DELETE NOPROMPT OBSOLETE ;
CROSSCHECK BACKUP OF DATABASE;
}

No comments: