沒有tag標識備份的情況下incremental updating backup是如何執行的
run
{
recover copy of datafile 10 with tag 'df10';
backup incremental level 1 for recover of copy with tag 'df10' datafile 10;
}
上面兩次出現了tag 'df10',對datafilecopy和incremental backup進行標記,表示只能用具有'df10'標記的incremental backup來更新具有'df10'標記的datafilecopy,避免因為其它不在incremental updating backups策略裡的備份摻雜進來而受到干擾。
像下面這樣如果不用tag進行標記,會出現什麼情況?
run
{
recover copy of datafile 10;
backup incremental level 1 for recover of copy datafile 10;
}
簡單測試一下
###清理掉所有datafile 10的backup和copy
delete backup of datafile 10;
delete copy of datafile 10;
###首次執行
run
{
recover copy of datafile 10;
backup incremental level 1 for recover of copy datafile 10;
}
Starting recover at 20150527 16:54:29
using channel ORA_DISK_1
no copy of datafile 10 found to recover
Finished recover at 20150527 16:54:29
Starting backup at 20150527 16:54:29
using channel ORA_DISK_1
no parent backup or copy of datafile 10 found
channel ORA_DISK_1: starting datafile copy
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
output file name=/oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf tag=TAG20150527T165430 RECID=22 STAMP=880822473
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 20150527 16:54:34
RMAN> list backup of datafile 10;
specification does not match any backup in the repository
RMAN> list copy of datafile 10;
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - ----------------- ---------- -----------------
6026 10 A 20150527 16:54:33 12723362707368 20150527 16:54:31
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
Tag: TAG20150527T165430
###二次執行
run
{
recover copy of datafile 10;
backup incremental level 1 for recover of copy datafile 10;
}
Starting recover at 20150527 16:55:41
using channel ORA_DISK_1
no copy of datafile 10 found to recover
Finished recover at 20150527 16:55:41
Starting backup at 20150527 16:55:41
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
channel ORA_DISK_1: starting piece 1 at 20150527 16:55:43
channel ORA_DISK_1: finished piece 1 at 20150527 16:55:44
piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp tag=TAG20150527T165542 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20150527 16:55:44
RMAN> list backup of datafile 10;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6289 Incr 1 32.00K DISK 00:00:01 20150527 16:55:44
BP Key: 6290 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165542
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp
List of Datafiles in backup set 6289
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707496 20150527 16:55:43 /oradata06/testaaaaa/ts0523.dbf
RMAN> list copy of datafile 10;
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - ----------------- ---------- -----------------
6026 10 A 20150527 16:54:33 12723362707368 20150527 16:54:31
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
Tag: TAG20150527T165430
###三次執行
run
{
recover copy of datafile 10;
backup incremental level 1 for recover of copy datafile 10;
}
Starting recover at 20150527 16:56:48
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00010 name=/oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
channel ORA_DISK_1: reading from backup piece /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp
channel ORA_DISK_1: piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp tag=TAG20150527T165542
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
Finished recover at 20150527 16:56:50
Starting backup at 20150527 16:56:52
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
channel ORA_DISK_1: starting piece 1 at 20150527 16:56:53
channel ORA_DISK_1: finished piece 1 at 20150527 16:56:54
piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp tag=TAG20150527T165652 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20150527 16:56:54
RMAN> list backup of datafile 10;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6289 Incr 1 32.00K DISK 00:00:01 20150527 16:55:44
BP Key: 6290 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165542
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp
List of Datafiles in backup set 6289
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707496 20150527 16:55:43 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6703 Incr 1 32.00K DISK 00:00:01 20150527 16:56:54
BP Key: 6705 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165652
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp
List of Datafiles in backup set 6703
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707649 20150527 16:56:53 /oradata06/testaaaaa/ts0523.dbf
RMAN> list copy of datafile 10;
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - ----------------- ---------- -----------------
6428 10 A 20150527 16:56:49 12723362707496 20150527 16:55:43
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
Tag: TAG20150527T165430
至此一切正常,就像加了tag一樣,下面我們強行對datafile 10生成一份incremental level 0的datafilecopy
RMAN> backup incremental level 0 as copy datafile 10;
Starting backup at 20150527 16:59:49
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
output file name=/oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkU-Hdw_.dbf tag=TAG20150527T165949 RECID=25 STAMP=880822792
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 20150527 16:59:54
RMAN> list copy of datafile 10;
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - ----------------- ---------- -----------------
7413 10 A 20150527 16:59:52 12723362707918 20150527 16:59:51
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkU-Hdw_.dbf
Tag: TAG20150527T165949
6428 10 A 20150527 16:56:49 12723362707496 20150527 16:55:43
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
Tag: TAG20150527T165430
###四次執行,可以看到使用的datafilecopy仍然是首次執行生成的o1_mf_ts0523_1jvkBwE8C_.dbf
run
{
recover copy of datafile 10;
backup incremental level 1 for recover of copy datafile 10;
}
Starting recover at 20150527 17:01:55
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00010 name=/oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
channel ORA_DISK_1: reading from backup piece /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp
channel ORA_DISK_1: piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp tag=TAG20150527T165652
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished recover at 20150527 17:01:56
Starting backup at 20150527 17:01:58
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
channel ORA_DISK_1: starting piece 1 at 20150527 17:02:00
channel ORA_DISK_1: finished piece 1 at 20150527 17:02:01
piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp tag=TAG20150527T170158 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20150527 17:02:01
RMAN> list backup of datafile 10;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6289 Incr 1 32.00K DISK 00:00:01 20150527 16:55:44
BP Key: 6290 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165542
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp
List of Datafiles in backup set 6289
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707496 20150527 16:55:43 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6703 Incr 1 32.00K DISK 00:00:01 20150527 16:56:54
BP Key: 6705 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165652
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp
List of Datafiles in backup set 6703
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707649 20150527 16:56:53 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
7855 Incr 1 32.00K DISK 00:00:01 20150527 17:02:01
BP Key: 7857 Status: AVAILABLE Compressed: NO Tag: TAG20150527T170158
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp
List of Datafiles in backup set 7855
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362708222 20150527 17:02:00 /oradata06/testaaaaa/ts0523.dbf
RMAN> list copy of datafile 10;
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - ----------------- ---------- -----------------
7413 10 A 20150527 16:59:52 12723362707918 20150527 16:59:51
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkU-Hdw_.dbf
Tag: TAG20150527T165949
7560 10 A 20150527 17:01:55 12723362707649 20150527 16:56:53
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
Tag: TAG20150527T165430
選擇首次執行生成的o1_mf_ts0523_1jvkBwE8C_.dbf進行recover的原因是強行生成的o1_mf_ts0523_1jvkU-Hdw_.dbf在四次執行recovery copy of datafile 10時尚沒有合適的基於其自身的incremental level 1 backup,但是backup incremental level 1 for recover of copy datafile 10生成卻是基於o1_mf_ts0523_1jvkU-Hdw_.dbf而生成的,從下面的查詢結果可以看出
---在catalog db裡檢視datafile 10的copy資訊
> select copy_key,file#,checkpoint_change#,checkpoint_time from rc_backup_copy_details where file#=10;
COPY_KEY FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME
---------------- ---------------- ------------------ -----------------
7413 10 12723362707918 20150527 16:59:51
7560 10 12723362707649 20150527 16:56:53
---在catalog db裡檢視datafile 10的所有ncremental level 1 backup資訊
set numwidth 16
set linesize 120
bs_key,incremental_level,completion_time,incremental_change#,checkpoint_change# from rc_backup_datafile where file#=10 order by completion_time;
BS_KEY INCREMENTAL_LEVEL COMPLETION_TIME INCREMENTAL_CHANGE# CHECKPOINT_CHANGE#
---------------- ----------------- ----------------- ------------------- ------------------
6289 1 20150527 16:55:44 12723362707368 12723362707496
6703 1 20150527 16:56:54 12723362707496 12723362707649
7855 1 20150527 17:02:01 12723362707918 12723362708222
從上述資訊可以看出最新生成的incremental level 1的backup(BS_KEY=7855)是基於COPY_KEY=7413所對應的copy,因為COPY_KEY=7413的CHECKPOINT_CHANGE#比COPY_KEY=7560的CHECKPOINT_CHANGE#更大,RMAN incremental level 1 backup總是會在最近的一次level 0或者level 1 backup的基礎上進行,所以選擇了COPY_KEY=7413這個copy
###五次執行,會發現recover的datafilecopy變為了o1_mf_ts0523_1jvkU-Hdw_.dbf,選擇的incremental level 1 backup是第四次執行中生成的o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp
run
{
recover copy of datafile 10;
backup incremental level 1 for recover of copy datafile 10;
}
Starting recover at 20150527 18:30:16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=466 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00010 name=/oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkU-Hdw_.dbf
channel ORA_DISK_1: reading from backup piece /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp
channel ORA_DISK_1: piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp tag=TAG20150527T170158
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished recover at 20150527 18:30:18
Starting backup at 20150527 18:30:20
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
channel ORA_DISK_1: starting piece 1 at 20150527 18:30:22
channel ORA_DISK_1: finished piece 1 at 20150527 18:30:23
piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp tag=TAG20150527T183020 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20150527 18:30:23
RMAN> list backup of datafile 10;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6289 Incr 1 32.00K DISK 00:00:01 20150527 16:55:44
BP Key: 6290 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165542
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp
List of Datafiles in backup set 6289
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707496 20150527 16:55:43 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6703 Incr 1 32.00K DISK 00:00:01 20150527 16:56:54
BP Key: 6705 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165652
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp
List of Datafiles in backup set 6703
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707649 20150527 16:56:53 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
7855 Incr 1 32.00K DISK 00:00:01 20150527 17:02:01
BP Key: 7857 Status: AVAILABLE Compressed: NO Tag: TAG20150527T170158
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp
List of Datafiles in backup set 7855
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362708222 20150527 17:02:00 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
8473 Incr 1 32.00K DISK 00:00:01 20150527 18:30:23
BP Key: 8475 Status: AVAILABLE Compressed: NO Tag: TAG20150527T183020
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp
List of Datafiles in backup set 8473
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362713971 20150527 18:30:22 /oradata06/testaaaaa/ts0523.dbf
RMAN> list copy of datafile 10;
List of Datafile Copies
=======================
Key File S Completion Time Ckp SCN Ckp Time
------- ---- - ----------------- ---------- -----------------
8162 10 A 20150527 18:30:17 12723362708222 20150527 17:02:00
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkU-Hdw_.dbf
Tag: TAG20150527T165949
7560 10 A 20150527 17:01:55 12723362707649 20150527 16:56:53
Name: /oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkBwE8C_.dbf
Tag: TAG20150527T165430
###強行對datafile 10生成incremental level 1 backup
RMAN> backup incremental level 1 datafile 10;
Starting backup at 20150527 18:36:49
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
channel ORA_DISK_1: starting piece 1 at 20150527 18:36:51
channel ORA_DISK_1: finished piece 1 at 20150527 18:36:52
piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183649_1jvpvt3PW_.bkp tag=TAG20150527T183649 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20150527 18:36:52
---列出最新的backup
RMAN> list backup of datafile 10;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6289 Incr 1 32.00K DISK 00:00:01 20150527 16:55:44
BP Key: 6290 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165542
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp
List of Datafiles in backup set 6289
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707496 20150527 16:55:43 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6703 Incr 1 32.00K DISK 00:00:01 20150527 16:56:54
BP Key: 6705 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165652
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp
List of Datafiles in backup set 6703
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707649 20150527 16:56:53 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
7855 Incr 1 32.00K DISK 00:00:01 20150527 17:02:01
BP Key: 7857 Status: AVAILABLE Compressed: NO Tag: TAG20150527T170158
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp
List of Datafiles in backup set 7855
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362708222 20150527 17:02:00 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
8473 Incr 1 32.00K DISK 00:00:01 20150527 18:30:23
BP Key: 8475 Status: AVAILABLE Compressed: NO Tag: TAG20150527T183020
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp
List of Datafiles in backup set 8473
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362713971 20150527 18:30:22 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
8793 Incr 1 32.00K DISK 00:00:01 20150527 18:36:52
BP Key: 8795 Status: AVAILABLE Compressed: NO Tag: TAG20150527T183649
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183649_1jvpvt3PW_.bkp
List of Datafiles in backup set 8793
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362714552 20150527 18:36:51 /oradata06/testaaaaa/ts0523.dbf
###六次執行,o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp這個增量備份是基於第五次輸出的Key=8162這個datafile copy
、o1_mf_nnnd1_TAG20150527T183649_1jvpvt3PW_.bkp這個增量備份是基於o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp
{
recover copy of datafile 10;
backup incremental level 1 for recover of copy datafile 10;
}
Starting recover at 20150527 18:43:27
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00010 name=/oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkU-Hdw_.dbf
channel ORA_DISK_1: reading from backup piece /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp
channel ORA_DISK_1: piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp tag=TAG20150527T183020
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00010 name=/oradata06/fra/TSTDB1/datafile/o1_mf_ts0523_1jvkU-Hdw_.dbf
channel ORA_DISK_1: reading from backup piece /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183649_1jvpvt3PW_.bkp
channel ORA_DISK_1: piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183649_1jvpvt3PW_.bkp tag=TAG20150527T183649
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished recover at 20150527 18:43:29
Starting backup at 20150527 18:43:31
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/oradata06/testaaaaa/ts0523.dbf
channel ORA_DISK_1: starting piece 1 at 20150527 18:43:33
channel ORA_DISK_1: finished piece 1 at 20150527 18:43:34
piece handle=/oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T184331_1jvqHrmUe_.bkp tag=TAG20150527T184331 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 20150527 18:43:34
> select bs_key,incremental_level,completion_time,incremental_change#,checkpoint_change# from rc_backup_datafile where file#=10 order by completion_time;
BS_KEY INCREMENTAL_LEVEL COMPLETION_TIME INCREMENTAL_CHANGE# CHECKPOINT_CHANGE#
---------------- ----------------- ----------------- ------------------- ------------------
6289 1 20150527 16:55:44 12723362707368 12723362707496
6703 1 20150527 16:56:54 12723362707496 12723362707649
7855 1 20150527 17:02:01 12723362707918 12723362708222
8473 1 20150527 18:30:23 12723362708222 12723362713971
8793 1 20150527 18:36:52 12723362713971 12723362714552
9289 1 20150527 18:43:34 12723362714552 12723362715035
6 rows selected.
> select copy_key,file#,checkpoint_change#,checkpoint_time from rc_backup_copy_details where file#=10;
COPY_KEY FILE# CHECKPOINT_CHANGE# CHECKPOINT_TIME
---------------- ---------------- ------------------ -----------------
7560 10 12723362707649 20150527 16:56:53
8960 10 12723362714552 20150527 18:36:51
RMAN> list backup of datafile 10;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6289 Incr 1 32.00K DISK 00:00:01 20150527 16:55:44
BP Key: 6290 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165542
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165542_1jvkGD7SV_.bkp
List of Datafiles in backup set 6289
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707496 20150527 16:55:43 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
6703 Incr 1 32.00K DISK 00:00:01 20150527 16:56:54
BP Key: 6705 Status: AVAILABLE Compressed: NO Tag: TAG20150527T165652
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T165652_1jvkKO5ej_.bkp
List of Datafiles in backup set 6703
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362707649 20150527 16:56:53 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
7855 Incr 1 32.00K DISK 00:00:01 20150527 17:02:01
BP Key: 7857 Status: AVAILABLE Compressed: NO Tag: TAG20150527T170158
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T170158_1jvkcgD_w_.bkp
List of Datafiles in backup set 7855
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362708222 20150527 17:02:00 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
8473 Incr 1 32.00K DISK 00:00:01 20150527 18:30:23
BP Key: 8475 Status: AVAILABLE Compressed: NO Tag: TAG20150527T183020
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183020_1jvpYgU5o_.bkp
List of Datafiles in backup set 8473
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362713971 20150527 18:30:22 /oradata06/testaaaaa/ts0523.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -----------------
8793 Incr 1 32.00K DISK 00:00:01 20150527 18:36:52
BP Key: 8795 Status: AVAILABLE Compressed: NO Tag: TAG20150527T183649
Piece Name: /oradata06/fra/TSTDB1/backupset/2015_05_27/o1_mf_nnnd1_TAG20150527T183649_1jvpvt3PW_.bkp
List of Datafiles in backup set 8793
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- ----------------- ----
10 1 Incr 12723362714552 20150527 18:36:51 /oradata06/testaaaaa/ts0523.dbf
從上述結果可以推斷出,在執行"recover copy of datafile 10"的時候,如果存在多個datafilecopy,那麼RMAN會按照如下條件選擇:
時間最近的一次datafilecopy,且要有基於該次Datafilecopy的incremental level 1 backup用來配合recover,這樣的datafilecopy才會被選中;
在執行"backup incremental level 1 for recover of copy datafile 10"的時候總是會以最近的一次datafilecopy為基礎進行level 1的增量備份
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/53956/viewspace-1674291/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 沒有備份的情況下處理undo損壞
- 沒有備份的情況下如何處理logical & physical corrupt blockBloC
- 不應該在沒有 sudo 的情況下執行 Docker 的原因Docker
- 沒有自動備份的情況下控制檔案全部丟失的恢復
- REDO檔案丟失的恢復__沒有任何備份的情況
- Oracle 10gR2 RAC 沒有備份的情況下恢復ocr和voteOracle 10g
- 資料庫在沒有備份的情況下的資料檔案損壞的恢復資料庫
- 如何在沒有前端框架的情況下實現元件化前端框架元件化
- 沒有連線target database的情況下執行RMAN duplicate可能引發的問題Database
- 運用incremental backup(增量備份)恢復歸檔GAP的DGREM
- 有return的情況下try catch finally的執行順序
- (轉)有return的情況下try catch finally的執行順
- 使用代理上網的情況下,如何在 cmd 下執行 mvn?
- 有整庫備份的情況rman恢復全庫
- 檢查備份情況的指令碼指令碼
- 如何這沒有顯示器的情況下獲取樹莓派IP?樹莓派
- 沒有介面文件的情況下如何開展介面自動化測試?
- Windows 98 在沒有註冊的情況下對系統進行更新(轉)Windows
- JPA EntityManager 在沒有實體類的情況下返回Map
- 開始使用 Org 模式吧,在沒有 Emacs 的情況下模式Mac
- DBMS_BACKUP_RESTORE.DBMS_BACKUP_RESTORE用於特殊情況下的恢復REST
- Oracle-無備份情況下,如何手動恢復控制檔案Oracle
- DBMS_BACKUP_RESTORE用於特殊情況下的恢復REST
- Backup And Recovery User's Guide-備份資料庫-RMAN備份概覽-為RMAN備份指定TAGGUIIDE資料庫
- 測試在cursor_sharing為force情況下執行計劃的共享情況
- ElasticSearch兩個節點的情況下,shard是如何分配的Elasticsearch
- 如何恢復Hyper Backup備份的資料
- RMan 備份incremental與cumulative的區別REM
- 被動式監控oracle的rman備份情況Oracle
- undo表空間檔案丟失恢復(2)--無備份有redo的情況下恢復
- DBMS_BACKUP_RESTORE用於特殊情況下的恢復(轉)REST
- full backup 與 level 0 incremental backupREM
- PG監控或判斷邏輯備份是否正常的方法,在pg_dump沒有引數記錄日誌資訊的情況下
- 有return的情況下try catch finally的執行順序(最有說服力的總結)
- Oracle 無備份情況下undo檔案損壞處理Oracle
- 全備份情況下,刪除控制檔案及恢復
- 其他資訊: 混合模式程式集是針對“v2.0.50727”版的執行時生成的,在沒有配置其他資訊的情況下,無法在 4.0 執行時中載入該程式集模式
- 多個Filter的執行具體情況Filter