Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand rman difference increment and cumulative increment

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to understand rman differential increment and cumulative increment". In daily operation, I believe many people have doubts about how to understand rman differential increment and cumulative increment. Xiaobian consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts of "how to understand rman differential increment and cumulative increment". Next, please follow the editor to study!

1. Concept

Differential increment (Differential): the backup of all data blocks that have changed since a low-level or the same level of backup, as the name suggests, that is, to prepare the differential data blocks since the previous backup

If the previous backup has both a low level and the same level, priority is given to the data blocks that have changed since the most recent low level (nmur1)

If there is no nmur1 level backup, choose to back up the data blocks that have changed since the same level backup.

If there is no backup at the same level, the data that has changed since the lower level is backed up.

If there are both nMel 1 level and the same level, the data that has changed since the same level is backed up.

Cumulative increment (Cumulative): is the backup of all data blocks that have changed since the nmur1 level (parent) or lower

If there are both low-level and nmur1 levels in the previous backup, the data blocks that have changed since nmur1 level are preferred.

If there is no nmur1 level, then prepare a lower level (nmurx)

2. Backup strategy and recovery

Take rman multi-level incremental backup as an example of backup strategy:

An incremental backup requires a level 0 backup as the basis. The difference between a level 0 backup and a full backup is that level 0 can be used for incremental recovery, while a full backup cannot.

Backup strategy:

Eg: we do the following backup strategy for a week

Case study.

Weekly difference increment cumulative increment

Sunday, level 0.

Monday, level 2.

Tuesday, level 2.

Wednesday level 1

Thursday, level 2.

Friday, level 2.

Saturday, level 2.

Sunday, level 0.

For the difference increment, Monday's second-level reserve changes from Sunday to Monday (there is no nmurl level 1, nor the same level)

The second level of Tuesday's data varies from Monday to Tuesday (there is no nmuri level 1, there is the same level)

Wednesday level 1 is available with data that varies from Sunday to Wednesday (there is no nmuri level 1, there is the same level)

Thursday's second-level reserve data changing from Wednesday to Thursday (with NMUE level 1)

Friday's second-level reserve data changing from Thursday to Friday (with NMUI level 1, with the same level)

The second level of Saturday is available with data changing from Friday to Saturday (with nmuri level 1, with the same level)

As shown in the figure:

If the database needs to be restored on Saturday (secondary backup completed on Friday, but not backed up on Saturday), then the difference increment only needs to be fully restored by using level 0 on Sunday, level 1 on Wednesday, and secondary plus archived logs on Thursday and Friday.

For cumulative increments, Monday's secondary reserve changes from Sunday to Monday (there is no nmurl level 1, there is a lower level)

Tuesday's secondary reserve data from Sunday to Tuesday (there is no NMUI level 1, there is a lower level)

The first level of Wednesday has data that changes from Sunday to Wednesday (there is NMUI level 1)

Thursday's second-level reserve data changing from Wednesday to Thursday (with NMUE level 1)

Friday's second-level standby data changing from Wednesday to Friday (with NMUE level 1)

The second level of Saturday has data that changes from Wednesday to Saturday (with NMUE level 1)

As shown in the figure:

If the database needs to be restored on Saturday (secondary backup on Friday is completed, but not backed up on Saturday), the cumulative increment needs level 0 on Sunday, level 1 on Wednesday, and secondary plus archived logs on Friday for full recovery.

The above is an one-week backup strategy. If you make a long-term backup strategy, you only need to extend the backup time to get a new backup strategy, depending on the acceptable degree of your backup and recovery. See the typical backup command of the final backup strategy:

Zero-level backup

Backup incremental level 0 database

First-order difference increment

Backup incremental level 1 database

First-order cumulative increment

Backup incremental level 1 cumulative database

Typical case of backup strategy:

Make a full backup of the database every six months (including all data and read-only tablespaces)

Make a level zero backup once a month (excluding read-only tablespaces)

Make a first-level backup once a week

Make a secondary backup once a day

Any changes to the database require resynchronization of the CATALOG directory and re-backup (such as adding data files) or re-backup (such as modifying the tablespace to read-only)

It is recommended that you back up the archive log for a period of time and archive it to tape on a regular basis

Full library backup script

Run {

Allocate channel c1 type disk

Allocate channel c2 type disk

Allocate channel c3 type disk

Backup full tag 'dbfull' format' / u01Accord oradata database backupfull% uplink% slots% p' database

Include current controlfile

Sql 'alter system archive log current'

Backup filesperset 3 format'/ u01Accord oradata Universe backupchar% uplink% slots% p'

Archivelog all delete input; # backup archiving is optional and can be backed up separately and regularly

Release channel c1

Release channel c2

Release channel c3

}

Zero-level backup script

Run {

Allocate channel c1 type disk

Allocate channel c2 type disk

Allocate channel c3 type disk

Backup incremental level 0 tag 'db0' format' / u01Universe oradataAccord backupDb0% upright% slots% p'

Database skip readonly

Sql 'alter system archive log current'

Backup filesperset 3 format'/ u01Accord oradata Universe backupchar% uplink% slots% p'

Archivelog all delete input; # backup archiving is optional and can be backed up separately and regularly

Release channel c1

Release channel c2

Release channel c3

}

First-level backup script

Run {

Allocate channel c1 type disk

Allocate channel c2 type disk

Allocate channel c3 type disk

Backup incremental level 1 tag 'db1' format' / u01Universe oradataPlacement backupDb1% uplink% slots% p'

Database skip readonly

Sql 'alter system archive log current'

Backup filesperset 3 format'/ u01Accord oradata Universe backupchar% uplink% slots% p'

Archivelog all delete input; # backup archiving is optional and can be backed up separately and regularly

Release channel c1

Release channel c2

Release channel c3

}

If you follow the above backup strategy, the amount of data that needs to be backed up every day is only changed by one day. When doing recovery, you need to restore at most one zero-level backup of the current month, three first-level backups, six second-level backups and archived files of the same day. If you cannot accept such a recovery time, you can reduce the interval between level zero backups. In principle, the archived logs before the backup point can be deleted after each backup, but for further security and future needs (such as using LOGMNR to find the required information), it is recommended that the archived logs be saved to an acceptable point in time and can be saved on cheap access devices such as tapes.

At this point, the study on "how to understand the difference increment and cumulative increment of rman" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report