####################################################################full database
vi /backup/ebsbackup_db_level0.sh
backup_path="/backup"
#backup
mkdir -p $backup_path
chown -R oracle:oinstall $backup_path
su - oracle -c 'rman target / nocatalog msglog=/backup/rman_L0.`date +%Y%m%d%H%M%S`.log' <<EOF
run
{
#CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO COMPRESSED BACKUPSET;
backup as compressed backupset incremental level 0 format '$backup_path/BZPROD_DATA_level0_%Y%M%D$(date +%H%M%S)_%U' database;
#sql "alter system archive log current";
#sql "alter system archive log current";
#sql "alter system archive log current";
backup as compressed backupset archivelog all format '$backup_path/BZPROD_ARCH_%Y%M%D$(date +%H%M%S)_%U';
backup current controlfile format '$backup_path/BZPROD_CONTROLFILE_level0_%Y%M%D$(date +%H%M%S)_%U';
}
EOF
####################################################################archivelog
vi /backup/ebsbackup_db_arch.sh
backup_path="/backup"
#backup
mkdir -p $backup_path
chown -R oracle:oinstall $backup_path
su - oracle -c 'rman target / nocatalog msglog=/backup/rman_arch.`date +%Y%m%d%H%M%S`.log' <<EOF
run
{
#CONFIGURE DEVICE TYPE DISK PARALLELISM 16 BACKUP TYPE TO COMPRESSED BACKUPSET;
#sql "alter system archive log current";
#sql "alter system archive log current";
#sql "alter system archive log current";
backup as compressed backupset archivelog all format '$backup_path/BZPROD_ARCH_%Y%M%D$(date +%H%M%S)_%U';
backup current controlfile format '$backup_path/BZPROD_CONTROLFILE_arch_%Y%M%D$(date +%H%M%S)_%U';
}
EOF
####################################################################
chmod +x /backup/ebsbackup_db_level0.sh /backup/ebsbackup_db_arch.sh
nohup sh /backup/ebsbackup_db_level0.sh &
nohup sh /backup/ebsbackup_db_arch.sh &
oracle rman backup scripts
未经允许不得转载:徐万新之路 » oracle rman backup scripts
最新评论
这个牛
放下欲望,男人从来不醉,充分且必要
勇气、责任、自信、创新,为天下先!
软件即数据,软件即服务,软件即管理,软件就是对人类各种社会活动的仿真和记录。软件很重要,但软件不可能凌驾于业务之上,尤其不可能高人一等。