免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2938 | 回复: 5
打印 上一主题 下一主题

RMAN备份两天前产生的日志并删除源文件怎么写 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-30 23:58 |只看该作者 |倒序浏览
我的定时备份脚本如下:备份正常,我想备份两天前的所有归档日志到带库,备份完成后删除原文件,这个脚本该怎么改
connect target sys/password@orcl;
connect rcvcat rman/rman@rman;
run {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
allocate channel t3 type 'SBT_TAPE';
allocate channel t4 type 'SBT_TAPE';
send 'NSR_ENV=(NSR_SERVER=ultra45,NSR_DATA_VOLUME_POOL=default)';
backup filesperset 2
format '/full_%d_%U/'
(archivelog  all );
release channel t1;
release channel t2;
release channel t3;
release channel t4;
}

[ 本帖最后由 king3171 于 2008-1-30 23:59 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-01-31 10:41 |只看该作者
有必要吗?为什么不像现在这样全备呢?

论坛徽章:
4
技术图书徽章
日期:2013-09-23 10:22:37狮子座
日期:2013-10-15 23:31:54卯兔
日期:2013-11-11 17:33:15金牛座
日期:2013-11-15 17:25:28
3 [报告]
发表于 2008-01-31 11:18 |只看该作者
backup archivelog  from time 'sysdate - 2' delete input;

论坛徽章:
0
4 [报告]
发表于 2008-02-01 12:50 |只看该作者
原帖由 nbrr 于 2008-1-31 11:18 发表
backup archivelog  from time 'sysdate - 2' delete input;

这个我试过,备份和删除的是两天内的,而不是两天前的

论坛徽章:
0
5 [报告]
发表于 2008-02-01 12:56 |只看该作者
connect target sys/password@orcl;
connect rcvcat rman/rman@rman;
run {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
allocate channel t3 type 'SBT_TAPE';
allocate channel t4 type 'SBT_TAPE';
send 'NSR_ENV=(NSR_SERVER=ultra45,NSR_DATA_VOLUME_POOL=default)';
backup filesperset 2
format '/full_%d_%U/'
(archivelog  until time 'sysdate-2' delete input );
release channel t1;
release channel t2;
release channel t3;
release channel t4;
}
这样写应该可以,不过执行时报错,很奇怪
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 02/01/2008 15:02:03
ORA-19563:  header validation failed for file

Recovery Manager complete.

[ 本帖最后由 king3171 于 2008-2-1 15:23 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2008-02-04 11:54 |只看该作者
backup  archivelog  until time ='SYSDATE-2'  delete input
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP