rman_bak.sh
rman target / nocatalog log=/d01/rmanbak/bak_`date +%m%d%H%M`.log<< EOF
run
{
configure device type disk parallelism 1;
configure channel C1 device type disk format='/d01/rmanbak/fu1%u.%p' maxpiecesize 4G;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '/d01/rmanbak/%F.bak';
# 压缩备份
backup as compressed backupset full database;
# 不压缩备份
backup database;
sql 'alter system archive log current';
release C1;
}
exit