首页 > 代码库 > rman 备份一
rman 备份一
#cat db_bak0.rman
run
{
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to ‘/u01/oracle/rmanbak/%F‘;
configure channel device type disk format ‘/u01/oracle/orabak/inc0_%d_%s_%p_%u_%T‘;
backup as compressed backupset incremental level 0 database;
}
创建用户
sql>create user rmanadmin identified by rmanadmin
sql>grant sysdba to rmanadmin
#cat exe_0_bak.sh
export ORACLE_HOSTNAME=orcl
export ORACLE_BASE=/u01/oracle
export ORACLE_SID=orcl
export ORACLE_HOME=/u01/oracle/db_1
export PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH
#export DATE=$(date +%Y_%m_%d)
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
/u01/oracle/db_1/bin/rman target rmanadmin/rmanadmin cmdfile=/u01/oracle/rmanbak/db_bak0.rman log=/u01/oracle/rmanbak/rman+$DATE.log append
本文出自 “oraclelinux” 博客,谢绝转载!
rman 备份一