oracle清除过期备份,删除ORACLE RMAN 的过期的备份

晚上在做oracle实验的时候,一开始就把前几天存放RMAN备份集目录下的文件给删掉了。结果我到RMAN 下,想把之前做的一些备份给删除,结果,任我怎么执行

RMAN>delete backup;

然后再才执行 ,list backup,里面数据还在,经过仔细查看,原来列出的备份文件,刚刚被我删掉了,可是RMAN 里的数据却没有更新。想想应该是要让rman的数据也要更新才行的,可是要怎么去更新RMAN的数据信息,只好求助GOOGLE,还别说真让我给找到了。

那就是在RMAN下执行

RMAN> crosscheck backup; 执行备份的交叉检查。

再接着执行

RMAN>delete expired backup; 删除过期的备份

再次执行查看备份情况,

RMAN>list backup;

这下发现,什么也没有,总算搞定刚刚小小的困惑;

下面把官方原文摘抄:

8.3.2 Deleting Expired RMAN Backups after CROSSCHECK

When the CROSSCHECK command is used to determine whether backups recorded in the repository still exist on disk or tape, if RMAN cannot locate the backups, then it updates their records in the RMAN repository to EXPIRED status. You can then use the DELETE EXPIRED command to remove records of expired backups from the RMAN repository. If the expired files still exist, then the DELETE EXPIRED command terminates with an error.

To delete expired repository records:If you have not performed a crosscheck recently, then issue a CROSSCHECK command. For example, issue:CROSSCHECK BACKUP; # checks backup sets and copies on configured channels

Delete the expired backups. For example, issue:DELETE EXPIRED BACKUP;

Note:

The DELETE EXPIRED command issues warnings if any objects marked as EXPIRED actually exist. In rare cases, the repository can mark an object as EXPIRED even though the object exists. For example, a directory containing an object is corrupted at the time of the crosscheck, but is later repaired, or the media manager was not configured properly and reported some backups as not existing when they really existed.

哈哈,看来以后是要多读oracle 的官方文档才行啊,不然人家说得这么明白的事,我都不知道,不是浪费人家的心血嘛!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值