rman全备

RMAN> run{
2> allocate channel d1 type disk;
3> backup as compressed backupset
4> incremental level 0
5> format '/u01/backup/inc0_%t_%T'
6> tag='inc0'
7> database include current controlfile;
8> sql 'alter system archive log current';
9> backup archivelog all format '/u01/backup/archlog_%d_%s_%u.bak' delete all input;
10> release channel d1;
11> }
rman全备脚本:
#!/bin/bash
rman target sys/sysdba nocatalog <
run {
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
set limit channel t1 kbytes 4194304;
set limit channel t2 kbytes 4194304;
set limit channel t3 kbytes 4194304;
backup
format '/u01/rman/full_wapdb_%U'
(database include current controlfile);
backup
format '/u01/rman/redolog_wapdb_%U' archivelog all delete input;
sql ' alter system archive log current';
release channel t1;
release channel t2;
release channel t3;
}
exit
EOF
---------------------------------------------------------------
[oracle@db1 ~]$ vi rman_backup.sh
#!/bin/bash
rman target sys/zjxc123 nocatalog <
run{
allocate channel d1 type disk;
backup as compressed backupset
incremental level 0
format '/u01/backup/inc0_%t_%T' tag='inc0'
database include current controlfile;
sql 'alter system archive log current';
backup archivelog all format '/u01/backup/archlog_%d_%s_%u.bak' delete all input;
release channel d1;
}
-------------------------------------------------------
单行命令:backup as compressed backupset database include current controlfile format'/u01/back/full_%t_%U.bak';
要在 rman show all 中 先配置
configure channel device type disk format '/u01/backup/inc0_%d_db_%u';
backup as compressed backupset database include current controlfile plus archivelog delete all input;
==========================================================
RMAN> report schema;
用 backup validate 不会产生实际的备份集
RMAN> backup validate datafile 2;
======================== 没有压缩的备份 ================================
RUN {
allocate channel c1 type disk;
allocate channel c2 type disk;
BACKUP FORMAT '/u01/data/orcl_%U_%T' skip inaccessible filesperset 5 DATABASE TAG orcl_hot_db_bk;
sql 'alter system archive log current';
BACKUP FORMAT '/u01/data/arch_%U_%T' skip inaccessible filesperset 5 ARCHIVELOG ALL DELETE INPUT;
backup current controlfile tag='bak_ctlfile' format='/u01/data/ctl_file_%U_%T';
backup spfile tag='spfile' format='/u01/data/ORCL_spfile_%U_%T';
release channel c2;
release channel c1;
}
===========================================

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26764973/viewspace-1173626/,如需转载,请注明出处,否则将追究法律责任。

上一篇: SYS.AUD$
下一篇: 监控rman备份信息
user_pic_default.png
请登录后发表评论 登录
全部评论
<%=items[i].createtime%>

<%=items[i].content%>

<%if(items[i].items.items.length) { %>
<%for(var j=0;j
<%=items[i].items.items[j].createtime%> 回复

<%=items[i].items.items[j].username%>   回复   <%=items[i].items.items[j].tousername%><%=items[i].items.items[j].content%>

<%}%> <%if(items[i].items.total > 5) { %>
还有<%=items[i].items.total-5%>条评论 ) data-count=1 data-flag=true>点击查看
<%}%>
<%}%>
<%}%>

转载于:http://blog.itpub.net/26764973/viewspace-1173626/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值