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

原文链接:https://www.f2er.com/oracle/211895.html

猜你在找的Oracle相关文章