Oracle RMAN INCREMENTAL 増分更新バックアップ

Oracle において 増分更新バックアップ に関して示す。

実行した事 - 実行手順 -

増分更新バックアップは以下の手順で実行した。

以下のファイルを用意

1回目、レベル1の増分更新バックアップを実行

以下、出力されたログファイルを解説

  Recovery Manager: Release 10.1.0.2.0 - Production

  Copyright (c) 1995, 2004, Oracle.  All rights reserved.

  connected to target database: TESTOEM (DBID=202311867)

  RMAN> CONFIGURE CHANNEL DEVICE TYPE disk FORMAT 'C:\oracle\product\10.1.0\backup\
        testoem_20050926\%U';
  2>
  3> RUN
  4> {
  5> BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_update_20050926' DATABASE ;
  6> RECOVER COPY OF DATABASE WITH TAG 'incr_update_20050926' ;
  7> }
  8>
  using target database controlfile instead of recovery catalog
  old RMAN configuration parameters:
  CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'C:\oracle\product\10.1.0\backup\
  testoem_reverse_command\%U';
  new RMAN configuration parameters:
  CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'C:\oracle\product\10.1.0\backup\
  testoem_20050926\%U';
  new RMAN configuration parameters are successfully stored

  Starting backup at 05-09-26
  allocated channel: ORA_DISK_1

※親TAGに元ずくバックアップが無いことを示す。

  channel ORA_DISK_1: sid=145 devtype=DISK
  no parent backup or copy of datafile 1 found
  no parent backup or copy of datafile 3 found
  no parent backup or copy of datafile 2 found
  no parent backup or copy of datafile 4 found

※親TAGに元ずくバックアップが無いのでバックアップを実行している。

  channel ORA_DISK_1: starting datafile copy
  input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\SYSTEM01.DBF
  output filename=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\DATA_D-TESTOEM_I-202311
  867_TS-SYSTEM_FNO-1_20GVJMM0 tag=INCR_UPDATE_20050926 recid=112 stamp=570022624
  channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:36
  channel ORA_DISK_1: starting datafile copy
  input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\SYSAUX01.DBF
  output filename=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\DATA_D-TESTOEM_I-2023118
  67_TS-SYSAUX_FNO-3_21GVJMN4 tag=INCR_UPDATE_20050926 recid=113 stamp=570022646
  channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
  channel ORA_DISK_1: starting datafile copy
  input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\UNDOTBS01.DBF
  output filename=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\DATA_D-TESTOEM_I-2023118
  67_TS-UNDOTBS1_FNO-2_22GVJMNT tag=INCR_UPDATE_20050926 recid=114 stamp=570022667
  channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:16
  channel ORA_DISK_1: starting datafile copy
  input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\USERS01.DBF
  output filename=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\DATA_D-TESTOEM_I-2023118
  67_TS-USERS_FNO-4_23GVJMOD tag=INCR_UPDATE_20050926 recid=115 stamp=570022670
  channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

※レベル1のバックアップセットを作成している。制御ファイル、SPFILEを含む。

  channel ORA_DISK_1: starting incremental level 1 datafile backupset
  channel ORA_DISK_1: specifying datafile(s) in backupset
  including current controlfile in backupset
  including current SPFILE in backupset
  channel ORA_DISK_1: starting piece 1 at 05-09-26
  channel ORA_DISK_1: finished piece 1 at 05-09-26
  piece handle=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\24GVJMOE_1_1 comment=NONE
  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
  Finished backup at 05-09-26

※リカバリするコピーが無いのでリカバリは実行しない。

  Starting recover at 05-09-26
  using channel ORA_DISK_1
  no copy of datafile 1 found to recover
  no copy of datafile 2 found to recover
  no copy of datafile 3 found to recover
  no copy of datafile 4 found to recover
  Finished recover at 05-09-26

  Recovery Manager complete.

2回目、レベル1の増分更新バックアップを実行

以下、出力されたログファイルを解説

  Recovery Manager: Release 10.1.0.2.0 - Production

  Copyright (c) 1995, 2004, Oracle.  All rights reserved.

  connected to target database: TESTOEM (DBID=202311867)

  RMAN> CONFIGURE CHANNEL DEVICE TYPE disk FORMAT 'C:\oracle\product\10.1.0\backup\
        testoem_20050926\%U';
  2>
  3> RUN
  4> {
  5> BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_update_20050926' DATABASE ;
  6> RECOVER COPY OF DATABASE WITH TAG 'incr_update_20050926' ;
  7> }
  8>
  using target database controlfile instead of recovery catalog
  old RMAN configuration parameters:
  CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'C:\oracle\product\10.1.0\backup\
  testoem_20050926\%U';
  new RMAN configuration parameters:
  CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'C:\oracle\product\10.1.0\backup\
  testoem_20050926\%U';
  new RMAN configuration parameters are successfully stored

  Starting backup at 05-09-26
  allocated channel: ORA_DISK_1
  channel ORA_DISK_1: sid=138 devtype=DISK

※親TAGに元ずくバックアップが有ることを示す。

  channel ORA_DISK_1: starting incremental level 1 datafile backupset
  channel ORA_DISK_1: specifying datafile(s) in backupset
  input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\SYSTEM01.DBF
  input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\SYSAUX01.DBF
  input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\UNDOTBS01.DBF
  input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\USERS01.DBF
  channel ORA_DISK_1: starting piece 1 at 05-09-26
  channel ORA_DISK_1: finished piece 1 at 05-09-26
  piece handle=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\25GVJNCC_1_1 comment=NONE
  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35

※レベル1のバックアップセットを作成している。制御ファイル、SPFILEを含む。

  channel ORA_DISK_1: starting incremental level 1 datafile backupset
  channel ORA_DISK_1: specifying datafile(s) in backupset
  including current controlfile in backupset
  including current SPFILE in backupset
  channel ORA_DISK_1: starting piece 1 at 05-09-26
  channel ORA_DISK_1: finished piece 1 at 05-09-26
  piece handle=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\26GVJNDG_1_1 comment=NONE
  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
  Finished backup at 05-09-26

※リカバリするコピーが有るのでリカバリは実行する。

  Starting recover at 05-09-26
  using channel ORA_DISK_1
  channel ORA_DISK_1: starting incremental datafile backupset restore
  channel ORA_DISK_1: specifying datafile copies to recover
  recovering datafilecopy fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\
  DATA_D-TESTOEM_I-202311867_TS-SYSTEM_FNO-1_20GVJMM0
  recovering datafilecopy fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\
  DATA_D-TESTOEM_I-202311867_TS-UNDOTBS1_FNO-2_22GVJMNT
  recovering datafilecopy fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\
  DATA_D-TESTOEM_I-202311867_TS-SYSAUX_FNO-3_21GVJMN4
  recovering datafilecopy fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\
  DATA_D-TESTOEM_I-202311867_TS-USERS_FNO-4_23GVJMOD
  channel ORA_DISK_1: restored backup piece 1
  piece handle=C:\ORACLE\PRODUCT\10.1.0\BACKUP\TESTOEM_20050926\25GVJNCC_1_1 tag=TAG20050926T114828
  channel ORA_DISK_1: restore complete
  Finished recover at 05-09-26

  Recovery Manager complete.

DATAFILE4に障害を起こし、リカバリを実行

以下、出力されたログファイルを解説

  Recovery Manager: Release 10.1.0.2.0 - Production

  Copyright (c) 1995, 2004, Oracle.  All rights reserved.

  connected to target database: TESTOEM (DBID=202311867)

  RMAN> RUN
  2> {
  3> RESTORE DATAFILE 4;
  4> RECOVER DATAFILE 4;
  5> ALTER DATABASE OPEN;
  6> }
  7>
  Starting restore at 05-09-26
  using target database controlfile instead of recovery catalog
  allocated channel: ORA_DISK_1
  channel ORA_DISK_1: sid=159 devtype=DISK

※リカバリを実行する。増分更新バックアップしたファイル1つの適用でバックアップを完了できる。

  channel ORA_DISK_1: restoring datafile 00004
  input datafilecopy recid=116 stamp=570023352 filename=C:\ORACLE\PRODUCT\10.1.0\BACKUP\
  TESTOEM_20050926\DATA_D-TESTOEM_I-202311867_TS-USERS_FNO-4_23GVJMOD
  destination for restore of datafile 00004: C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\USERS01.DBF
  channel ORA_DISK_1: copied datafilecopy of datafile 00004
  output filename=C:\ORACLE\PRODUCT\10.1.0\ORADATA\TESTOEM\USERS01.DBF recid=120 stamp=570023662
  Finished restore at 05-09-26

  Starting recover at 05-09-26
  using channel ORA_DISK_1

  starting media recovery
  media recovery complete

  Finished recover at 05-09-26

  database opened

  Recovery Manager complete.

ご訪問頂き有難う御座います。 当サイトを効率良く使うためにまずは FrontPage を見て下さい。 検索方法、一覧表示などの各情報を纏めています。
当サイトの説明 → Frontpage