Incremental backup of RMAN backup Sets

Source: Internet
Author: User

During traditional Oracle backup, database files are backed up by copying operating system files. The backup granularity is data files, and the data files may be large, however, it is empty blocks and there is no Oracle data, but because it is a file copy, you need to back up the entire file.

The backup set value of ramn backs up used data blocks and supports Incremental backup.

Generally, Incremental Backup has three forms:

Level 0 Incremental backup, including all used data blocks.

Differential backup, including the changed data blocks from the last backup (which can be level 0 Incremental backup, differential backup, and cumulative backup.

Accumulative backup, including the data blocks that have been changed since the last 0-level Incremental backup.

Each zero-level backup creates a new backup cycle.

For example, in the following backup policy, there is a zero-level Incremental Backup every Sunday evening, a one-level cumulative backup on Wednesday evening, and a level-1 differential backup on other nights.

The blocks in the backup set are as follows:

Perform the following steps:

For basic RMAN operations, refer to the http://blog.csdn.net/kkdelta/article/details/7202958

1. grade 0 backup on Sunday

RMAN> run {
2> allocate channel C1 type disk;
3> Backup incremental level 0 database format 'd: \ oracle \ rmanrep \ butdblv0 % u. dmp ';
4>}

2. Data changes in the database from Sunday to Monday: insert into test values (1, 'Monday lv1d ');

RMAN> run {
2> allocate channel C1 type disk;
3> Backup incremental Level 1 database format 'd: \ oracle \ rmanrep \ butdblv2d1 % u. dmp ';
4>}
3. Data changes in the database from Monday to Tuesday: insert into test values (2, 'tuesday lv1d ');
RMAN> run {
2> allocate channel C1 type disk;
3> Backup incremental Level 1 database format 'd: \ oracle \ rmanrep \ butdblv2d2 % u. dmp ';
4>}

4. Data changes in the database from Tuesday to Wednesday: insert into test values (3, 'wednesday lv1c ');
RMAN> run {
2> allocate channel C1 type disk;
3> Backup incremental Level 1
Cumulative database format 'd: \ oracle \ rmanrep \ butdblv1d3 % u. dmp ';
4>}

Thursday, Friday, and Saturday are similar to step 2 and Step 3 above.

On the next Sunday, perform level 0 backup and a new backup cycle starts.

* In the OCP book, the syntax for level 1 differential backup is backup incremental Level 1 differential database. During the operation

RMAN syntax error: RMAN-01008: The bad identifier was: Differential

False Incremental backup of evercopy"

Incarnation is the fastest way to restore an impression copy, because it is a complete backup of a data file. During restoration, you only need to restore the data file, use redo log to restore the database. unlike backup sets, you need to "extract" files from the backup set. however, because the evercopy is a complete data file, it cannot perform Incremental backup like a dataset.

However, RMAN provides an "incremental update" Method for evercopy:

1. Back up a 0-level Incremental backup of an impression copy.

Run {
Allocate channel C1 type disk;
Backup as copy incremental level 0 database tag lv0copy format 'd: \ oracle \ rmanrep \ butdblv0copy % u. dmp ';
}

2. Perform regular incremental updates:

Run {
Allocate channel C1 type disk;
Backup incremental Level 1
For recover of copy with Tag lv0copy
Database tag db_copy_update;
Recover copy of database with Tag lv0copy;
Delete backupset tag db_copy_update;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.