Saturday 22 February 2014

Cold Backup script with RMAN


Taking the backup of the database when db is down. But if we are using RMAN for backup we need to keep the database in mount state.

Copy the following contents to a file with name COLD_BACKUP_RMAN.rc

=============================================
run {
   shutdown immediate;
   startup mount;
   allocate channel dup1 device type disk;
   allocate channel dup2 device type disk;
   backup database;
   release channel dup1;
   release channel dup2;
   alter database open;
  }
=============================================

Now set the DB environment using your regular method then run the following command.

$ rman target / @COLD_BACKUP_RMAN.rc

1 comment:

  1. In case of RAC multiple node how do we do this ?

    How to shutdown all database and make it up when database backup is success or failed?

    ReplyDelete