Oracle Rman Full Recovery case (vii) recovery with incremental backups

Source: Internet
Author: User
Tags commit count backup

Case 7:

--Recovery with incremental backups

1) Establish an incremental backup

-------0-level backup using image backup as an incremental backup

rman> copy datafile 2 to '/disk1/rman/prod/users_%s.bak ';

2) Establish a level 2 differential backup

--------test Environment

08:05:52 sql> Conn Scott/tiger

Connected.

08:05:58 sql>

08:05:58 sql> INSERT INTO the EMP1 select * from EMP1;

4 rows created.

08:06:00 sql>/

8 rows created.

08:06:01 sql> commit;

Commit complete.

08:06:03 sql>

Rman> Backup Incremental Level 2 format '/disk1/rman/prod/users_2_%s.bak ' DataFile 2;

Rman> list Backup of DataFile 2;

List of Backup Sets

===================

BS Key Type LV Size Device Type Elapsed Time Completion time

------- ---- -- ---------- ----------- ------------ ---------------

Notoginseng Incr 2 528.00K DISK 00:00:00 18-aug-11

BP key:37 status:available Compressed:no tag:tag20110818t080650

Piece Name:/disk1/rman/prod/users_2_42.bak

List of Datafiles in backup set 37

File LV Type Ckp SCN Ckp time Name

---- -- ---- ---------- --------- ----

2 2 Incr 1404665 18-aug-11/u01/app/oracle/oradata/prod/users01.dbf

3) Establish a Level 2 differential backup

08:06:03 sql> INSERT INTO the EMP1 select * from EMP1;

Rows created.

08:07:49 sql>/

Rows created.

08:07:51 sql> commit;

Commit complete.

08:07:53 sql>

Rman> Backup Incremental Level 2 format '/disk1/rman/prod/users_2_%s.bak ' DataFile 2;

4) Establish a cumulative incremental backup

08:07:53 sql> INSERT INTO the EMP1 select * from EMP1;

Created rows.

08:08:55 sql>/

128 rows created.

08:08:55 sql> commit;

Commit complete.

08:08:57 sql>

Rman> Backup Incremental Level 1 cumulative format '/disk1/rman/prod/users_1cu_%s.bak ' DataFile 2;

BS Key Type LV Size Device Type Elapsed Time Completion time

------- ---- -- ---------- ----------- ------------ ---------------

INCR 1 528.00K DISK 00:00:00 18-aug-11

BP key:41 status:available Compressed:no tag:tag20110818t080942

Piece Name:/disk1/rman/prod/users_1cu_46.bak

List of Datafiles in backup set 41

File LV Type Ckp SCN Ckp time Name

---- -- ---- ---------- --------- ----

2 1 Incr 1404815 18-aug-11/u01/app/oracle/oradata/prod/users01.dbf

--------------Recovery

1) test environment

08:08:57 sql> Select COUNT (*) from EMP1;

COUNT (*)

----------

256

08:10:33 sql> shutdown Abort

[Oracle@work ~]$ rm/u01/app/oracle/oradata/prod/users01.dbf

2) Start the database

08:10:52 sql> Startup

Related Article

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.