ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1 BACKUP_LOG_PATH=/u02/oracle/backup/CID export ORACLE_BASE export ORACLE_HOME export ORACLE_SID=CID export BACKUP_LOG_PATH LOG_FILE=${BACKUP_LOG_PATH}/backup_db.log $ORACLE_HOME/bin/rman msglog=${LOG_FILE} << EOF connect target / run { allocate channel t1 type disk; allocate channel t2 type disk; allocate channel t3 type disk; backup database format '/u02/oracle/backup/CID/database_%d_%u_%s'; release channel t1; release channel t2; release channel t3; } sql 'alter system archive log current'; run { allocate channel a1 type disk; allocate channel a2 type disk; allocate channel a3 type disk; backup archivelog all format '/u02/oracle/backup/CID/arch_%d_%u_%s'; release channel a1; release channel a2; release channel a3; } run { allocate channel c1 type disk; backup current controlfile for standby format '/u02/oracle/backup/CID/Control_%d_%u_%s'; release channel c1; } exit; EOF