rmanバックアップのリカバリ可能性の検証

3512 ワード

restore database previewを使用して、rmanがデータベースをリカバリするために使用するバックアップセットとアーカイブを表示します.
RMAN> restore database preview;

Starting restore at 21-MAY-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=146 device type=DISK


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    499.65M    DISK        00:00:15     21-MAY-14      
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20140521T113601
        Piece Name: /home/oracle/backup/07p8r9p2_1_1_20140521.bak
  List of Datafiles in backup set 3
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1095682    21-MAY-14 /opt/oracle/oradata/squan/system01.dbf
  2       Full 1095682    21-MAY-14 /opt/oracle/oradata/squan/sysaux01.dbf
  3       Full 1095682    21-MAY-14 /opt/oracle/oradata/squan/undotbs01.dbf
  4       Full 1095682    21-MAY-14 /opt/oracle/oradata/squan/users01.dbf
  5       Full 1095682    21-MAY-14 /opt/oracle/oradata/squan/test02.dbf
  6       Full 1095682    21-MAY-14 /opt/oracle/oradata/squan/test01.dbf
using channel ORA_DISK_1

List of Archived Log Copies for database with db_unique_name SQUAN
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
9       1    42      A 21-MAY-14
        Name: /opt/arch/1_42_846708003.dbf

Media recovery start SCN is 1095682
Recovery must be done beyond SCN 1095682 to clear datafile fuzziness
Finished restore at 21-MAY-14

validateコマンドはバックアップセットの整合性をチェックし、すべてのバックアップ、copy、アーカイブのバックアップセットをチェックします.この検証操作はあまり長くありません.
RMAN> restore database validate;

Starting restore at 21-MAY-14
using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/07p8r9p2_1_1_20140521.bak
channel ORA_DISK_1: piece handle=/home/oracle/backup/07p8r9p2_1_1_20140521.bak tag=TAG20140521T113601
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:04
Finished restore at 21-MAY-14

また、check logicalを使用して、バックアップセットに不良ブロックがあるかどうかを確認できます.許容される不良ブロックの数を設定できますが、一般的には推奨されません.デフォルトでは、不良ブロックが終了します.
RMAN> restore database check logical validate;

Starting restore at 21-MAY-14
using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/07p8r9p2_1_1_20140521.bak
channel ORA_DISK_1: piece handle=/home/oracle/backup/07p8r9p2_1_1_20140521.bak tag=TAG20140521T113601
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 21-MAY-14
 
RMAN> validate backupset 3;

Starting validate at 21-MAY-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece /home/oracle/backup/07p8r9p2_1_1_20140521.bak
channel ORA_DISK_1: piece handle=/home/oracle/backup/07p8r9p2_1_1_20140521.bak tag=TAG20140521T113601
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished validate at 21-MAY-14