资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

Oracle数据库备份脚本-创新互联

物理备份脚本

#!/bin/sh

成都网站设计、成都网站制作中从网站色彩、结构布局、栏目设置、关键词群组等细微处着手,突出企业的产品/服务/品牌,帮助企业锁定精准用户,提高在线咨询和转化,使成都网站营销成为有效果、有回报的无锡营销推广。成都创新互联专业成都网站建设10多年了,客户满意度97.8%,欢迎成都创新互联客户联系。

export TMPDIR=$TMP;

export ORACLE_SID=orcl;

export ORACLE_BASE=/u01/app/oracle;

export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1;

export PATH=/u01/app/oracle/product/12.2.0.1/db_1/bin:$PATH;

export LD_LIBRARY_PATH=/u01/app/oracle/product/12.2.0.1/db_1/lib:/lib:/usr/lib;

export CLASSPATH=/u01/app/oracle/product/12.2.0.1/db_1/JRE:/u01/app/oracle/product/12.2.0.1/db_1/jlib:/u01/app/oracle/product/12.2.0.1/db_1/rdbms/jlib;

export LANG=zh_CN

rman target/ << EOF

run{

allocate channel c1 type disk;

allocate channel c2 type disk;

allocate channel c3 type disk;

delete noprompt expired archivelog all;

backup incremental level 0 tag 'db0' format

'/home/oracle/rmanbackup/db0_%d_%T_%s' database include current controlfile;

sql 'alter system archive log current';

backup filesperset 5 format '/home/oracle/rmanbackup/cf0_%d_%T_%s' archivelog all delete input;

delete noprompt expired backup;

delete noprompt obsolete;

release channel c1;

release channel c2;

release channel c3;

}

EOF

逻辑备份脚本:

#!/bin/sh

DAY=`date +%Y%m%d`

FILE_TARGET=orcl`date +%Y%m%d`.dmp

FILE_LOG=orcl`date +%Y%m%d`.log

export FILE_TARGET FILE_LOG;

export ORACLE_BASE=/u01/app/oracle;

export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db_1;

export ORACLE_SID=orcl;

export PATH=$ORACLE_HOME/bin:$PATH;

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;

export CLASSPATH=/u01/app/oracle/product/12.2.0.1/db_1/JRE:/u01/app/oracle/product/12.2.0.1/db_1/jlib:/u01/app/oracle/product/12.2.0.1/db_1/rdbms/jlib;

expdp system/******  directory=expdir dumpfile=$FILE_TARGET full=y  logfile=$FILE_LOG


文章题目:Oracle数据库备份脚本-创新互联
分享地址:http://www.cdkjz.cn/article/djeods.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220