RMAN Backup in Disk
dt=`date '+%d%m%Y%H%M'`
rman target rman_bkp_user/password <<eof
sql 'alter system archive log current';
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate channel c5 type disk;
allocate channel c6 type disk;
allocate channel c7 type disk;
backup AS COMPRESSED BACKUPSET full database tag T24_DB_$dt format '/db_rmanbackup/t24_db_%p_%s_$dt.bkp';
sql 'alter system archive log current';
backup current controlfile tag T24_CTL_$dt format '/db_rmanbackup/t24_ctl_%p_%s_$dt.bkp';
backup spfile tag T24_SPF_$dt format '/db_rmanbackup/t24_spf_%p_%s_$dt.bkp' ;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
release channel c6;
release channel c7;
}
eof
Note: rman_bkp_user must have SYSDBA privilege to run RMAN backup.
dt=`date '+%d%m%Y%H%M'`
rman target rman_bkp_user/password <<eof
sql 'alter system archive log current';
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate channel c5 type disk;
allocate channel c6 type disk;
allocate channel c7 type disk;
backup AS COMPRESSED BACKUPSET full database tag T24_DB_$dt format '/db_rmanbackup/t24_db_%p_%s_$dt.bkp';
sql 'alter system archive log current';
backup current controlfile tag T24_CTL_$dt format '/db_rmanbackup/t24_ctl_%p_%s_$dt.bkp';
backup spfile tag T24_SPF_$dt format '/db_rmanbackup/t24_spf_%p_%s_$dt.bkp' ;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
release channel c6;
release channel c7;
}
eof
Note: rman_bkp_user must have SYSDBA privilege to run RMAN backup.