In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the backup retention strategy in RMAN, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let's take a look at it.
Two backup retention policies are provided in RMAN: time-based and redundancy-based backup retention policies
1. Time-based backup retention policy
This strategy means that we want the database to be restored to a few days ago at the earliest. For example, if you set the recovery time to 7, the backups that RMAN keeps are those files that ensure that the database is restored to any time of the week.
Configure a time-based backup retention policy
RMAN > CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS
The backup retention policy by default is
RMAN > CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
Any backup that does not meet the above conditions will be discarded by RMAN. It can be deleted through the DELETE OBSOLETE command.
two。 Backup retention strategy based on redundancy
Based on the number of redundancy, it is essentially the number of backups that exist in various forms of a data file, including backup collection mirror replication. If a data file has more than the specified number of redundant backups, RMAN marks the oldest backup as obsolete.
Configure a backup retention policy based on redundancy
RMAN > configure retention policy to redundancy 2
3. Do not set backup retention policy
RMAN > configuration retention policy to none
"if you do not set any retention policy, using the REPORT OBSOLETE and DELETE OBSOLETE commands will not work."
4. Maintain backup sets according to backup policy
After you set a backup policy for RMAN, RMAN automatically determines which backup sets or mirror replication files no longer need to be retained, and these files are marked as OBSOLETE.
Delete obsolete backup
RMAN > REPORT OBSOLETE
RMAN > DELETE OBSOLETE
There are two parts you need to know to execute this command:
N if the backup that is judged to be obsolete is a mirror copy of a separate data file, the image copy file will be deleted directly when the DELETE command is executed.
N if a backup that is judged to be obsolete is part of a backup set, you must wait until all other files in the entire backup set are discarded before you can delete the backup set.
5. Whether to use the RMAN backup set retention policy
If the database you manage is very large and backups are performed frequently, it is necessary to develop a reasonable retention policy for this file. It is recommended that based on the retention policy of redundancy, take the default value and set redundancy to 1.
Thank you for reading this article carefully. I hope the article "what are the backup retention strategies in RMAN" shared by the editor will be helpful to you? at the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.