RMAN 的备份保留策略
RMAN 的備份保留策略:
命令格式:
configure retention policy clear ---------------備份保留策略使用默認值
configure retention policy to none------------不采用任何備份保留策略
configure retention policy to recover window of integer days------------基于時間的備份保留策略,保留幾天前的備份文件
configure retention policy to redundancy integer-------基于冗余備份的備份保留策略,對備份文件保留幾個冗余備份
1:基于時間
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
保留七天內的所有備份。
2:基于冗余備份
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3
為每個數據文件保留3個冗余備份。
?
備份保留策略不需要的文件是廢棄狀態的文件,比如:八天前的數據文件和時間最早的第四個冗余備份
REPORT OBSOLETE命令查看當前處于廢棄狀態的備份文件
DELETE OBSOLET 命令可立刻刪除備份保留策略 不需要的文件(廢棄文件)。
====文檔解釋====
Configuring a Retention Policy
Retention policy governs how long database backups are retained, and?
determines how far into the past you can recover your database. Retention policy?
can be set in terms of a recovery window (how far into the past you need to be?
able to recover your database), or a redundancy value (how many backups of?
each file must be retained). Choosing an effective retention policy is a vital part?
of your backup strategy.?
This command ensures that RMAN retains all backups needed to recover the?
database to any point in time in the last 7 days:
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
This command ensures that RMAN retains three backups of each datafile:
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
Use DELETE OBSOLETE to immediately delete backups no longer required by the?
retention policy. (For backups stored in a flash recovery area, you do not need to?
perform this step. The database automatically deletes obsolete backups in the?
flash recovery area when space is needed, as well as files that have been backed?
up to a media manager.)
=======end===============================================
總結
以上是生活随笔為你收集整理的RMAN 的备份保留策略的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CONFIGURE CONTROLFIL
- 下一篇: alter database open