码迷,mamicode.com
首页 > 其他好文 > 详细

rman 备份一

时间:2016-11-08 20:37:25      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:rman   oracle   

#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 备份一

标签:rman   oracle   

原文地址:http://anneoracle.blog.51cto.com/2025743/1870673

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!