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

What is the method of oracle incremental backup recovery verification

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

Share

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

This article mainly explains "what is the method of oracle incremental backup recovery verification". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "what is the method of oracle incremental backup recovery verification"?

First, transfer the backup file to the destination and decompress it. The following is the daily backup, where 20190816 is a level 0 differential incremental backup.

The rest are level 1 differential incremental backups

[oracle@beijing-fuli-hadoop-03 / data/backup/oracle] $ll

Total 0

Drwxr-xr-x 2 oracle oinstall 332 Aug 18 18:39 20190816

Drwxr-xr-x 2 oracle oinstall 298 Aug 18 18:41 20190817

Drwxr-xr-x 2 oracle oinstall 298 Aug 18 18:44 20190818

1. Restore parameter files (parameter files are backed up when the control file is backed up automatically)

RMAN > restore spfile from'/ data/backup/oracle/20190818/db2_lev1_c-2174667026-20190818-1a'

Then create it as pfile and modify it accordingly

Create pfile from spfile

two。 Restore the control file (select the control file for the last backup)

RMAN > restore controlfile from'/ data/backup/oracle/20190818/controlfile20190818184413.bak'

Starting restore at 18-AUG-19

Allocated channel: ORA_DISK_1

Channel ORA_DISK_1: SID=129 device type=DISK

Channel ORA_DISK_1: restoring control file

Channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Output file name=/data/u01/app/oracle/oradata/db2/control01.ctl

Output file name=/data/u01/app/oracle/fast_recovery_area/db2/control02.ctl

Finished restore at 18-AUG-19

3. Restore data files and achieve data consistency with archived logs

Tell rman where the backup files are:

RMAN > catalog start with'/ data/backup/oracle'

3.2 specific recovery, time-based recovery, choose a larger time, that is, the time must be after the backup time!

Run {

Set until time "to_date ('2019-08-28 20-20-30-15-13-13-13-8-28-20-20-20-13-13-12-8-28-20-20-13-13-12-8-28-20-20-13-12-13-12-12-13-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-14-12-12-12-12-12-12-12-14-12-14-12-12-12-12-12-12-12-12-12-12-12-12-

Restore database

Recover database

}

3.3 Open the database:

SQL > alter database open resetlogs

Database altered.

If you have more archived logs, you can transfer the logs to the destination, and then proceed to the previous step 3. As for which archives need to be sent, you need to judge, that is, as long as you include the scn after the completion of the last backup, and then oracle automatically identifies which archive log needs to be applied, without the need to specify what you think. So the principle is that it is possible to transmit more archive, do not transmit less!

First, after completing the last incremental backup, insert a piece of data in the main database.

SQL > insert into liuwenhe.test values (1010101)

SQL > commit

SQL > alter system ARCHIVE LOG CURRENT

Then send the latest archive log to the destination

[oracle@beijing-fuli-hadoop-02 archive] $scp 1x 32 * oracle@10.9.21.115:/data/backup/oracle

The authenticity of host '10.9.21.115 (10.9.21.115)' can't be established.

RSA key fingerprint is b4:c6:cf:53:53:6e:b6:9d:0b:a1:cf:45:67:ec:b9:57.

Are you sure you want to continue connecting (yes/no)? Yes

Warning: Permanently added '10.9.21.115' (RSA) to the list of known hosts.

Oracle@10.9.21.115's password:

1_320_1013795224.dbf 100% 1024 1.0KB/s 00:00

1_32_1011211412.dbf 100% 27MB 26.9MB/s 00:00

1_32_1012767360.dbf 100% 27MB 27.0MB/s 00:00

1_321_1013795224.dbf 100% 75KB 75.0KB/s 00:00

1_322_1013795224.dbf 100% 2048 2.0KB/s 00:00

1_323_1013795224.dbf 100% 1024 1.0KB/s 00:00

1_324_1013795224.dbf 100% 3343KB 3.3MB/s 00:00

1_325_1013795224.dbf 100% 18KB 18.0KB/s 00:00

1_326_1013795224.dbf 100% 12KB 12.0KB/s 00:00

1_327_1013795224.dbf

Send the latest archive to the destination, and then tell rman where the backup file and the most recent archive are:

RMAN > catalog start with'/ data/backup/oracle'

Specific recovery, time-based recovery, choose a larger time, that is, the time must be after the backup time!

Run {

Set until time "to_date ('2019-08-28 20-20-30-15-13-13-13-8-28-20-20-20-13-13-12-8-28-20-20-13-13-12-8-28-20-20-13-12-13-12-12-13-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-14-12-12-12-12-12-12-12-14-12-14-12-12-12-12-12-12-12-12-12-12-12-12-

Restore database

Recover database

}

3.3 Open the database:

SQL > alter database open resetlogs

Database altered.

Found that the most recent archive has been applied: found that 1010101 of this data already exists

SQL > select * from liuwenhe.test

ID

-

one hundred

one hundred

one

two

twenty-two

1010101

6 rows selected.

At this point, the recovery of incremental backup is completed!

RMAN incomplete recovery of the main operation commands!

A. Incomplete recovery based on TIME parameters

Run {

Shutdown immediate

Startup mount

Set until time "to_date ('2019-04-28 20-20-15-30-12-13-13-12-4-28-20-20-30-20-13-13-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-13-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12-12, 2019-04-28 and 13-12, respectively, respectively). Set until time" to_date

Restore database

Recover database

Alter database open resetlogs

}

B. Incomplete recovery based on SCN parameters

Run {

Shutdown immediate

Startup mount

Set until scn 3400

Restore database

Recover database

Alter database open resetlogs

}

C. Incomplete recovery based on SEQUENCE parameters:

Run {

Shutdown immediate

Startup mount

Set until sequence 12903

Restore database

Recover database

Alter database open resetlogs

At this point, I believe you have a deeper understanding of "what is the method of oracle incremental backup recovery verification". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue 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.

Share To

Database

Wechat

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

12
Report