Data Guard:プライマリサイトでチェンジ・トラッキング高速増分バックアップの構成(11g)

1. プライマリでチェンジ・トラッキングを有効にする。

環境確認

PROD(SYS)> select name, db_unique_name, open_mode, database_role from v$database;

NAME      DB_UNIQUE_NAME                 OPEN_MODE  DATABASE_ROLE
--------- ------------------------------ ---------- ----------------
PROD      PROD                           READ WRITE PRIMARY

PROD(SYS)>

チェンジ・トラッキングを有効にする
PROD(SYS)> set lines 120
PROD(SYS)> col filename format a80
PROD(SYS)> select * from v$block_change_tracking;

STATUS     FILENAME                                                                              BYTES
---------- -------------------------------------------------------------------------------- ----------
DISABLED

PROD(SYS)> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/u01/app/oracle/bak/PROD/bc_tracking/PROD_bc_tracking.f';       

Database altered.

PROD(SYS)> select * from v$block_change_tracking;

STATUS     FILENAME                                                                              BYTES
---------- -------------------------------------------------------------------------------- ----------
ENABLED    /u01/app/oracle/bak/PROD/bc_tracking/PROD_bc_tracking.f                            11599872

PROD(SYS)>

2. プライマリでの高速増分バックアップ

2.1 プライマリ側のRMANの構成設定

アーカイブログ削除ポリシーの構成:スタンバイに適用済み且つ一回以上バックアップされた

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DEVICE TYPE DISK;

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
new RMAN configuration parameters are successfully stored

RMAN> show all;

RMAN configuration parameters for database with db_unique_name PROD are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/app/oracle/bak/PROD/rman/ctl_%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/u01/app/oracle/bak/PROD/rman/%d_%U_%T';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.1.0/db_1/dbs/snapcf_PROD.f'; # default

RMAN>
2.2 プライマリ側のレベル0全体バックアップ取得
RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG;

Starting backup at 10-DEC-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=75 device type=DISK
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=19 RECID=6 STAMP=705177982
input archived log thread=1 sequence=20 RECID=7 STAMP=705177983
... 略
2.3 プライマリ側のレベル1増分バックアップ取得
RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE PLUS ARCHIVELOG;

Starting backup at 10-DEC-09
current log archived
using channel ORA_DISK_1
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_12_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_13_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_14_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_15_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_16_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_17_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_18_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_19_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_20_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_21_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_22_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_23_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_24_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_25_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_26_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_27_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_28_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_29_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_30_704823111.arch; already backed up 1 time(s)
skipping archived log file /u01/app/oracle/bak/PROD/arch/PROD_1_31_704823111.arch; already backed up 1 time(s)
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=32 RECID=105 STAMP=705256880
channel ORA_DISK_1: starting piece 1 at 10-DEC-09
channel ORA_DISK_1: finished piece 1 at 10-DEC-09
piece handle=/u01/app/oracle/bak/PROD/rman/PROD_2vl0indh_1_1_20091210 tag=TAG20091210T164120 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-DEC-09

Starting backup at 10-DEC-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD/undotbs01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/PROD/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD/users01.dbf
channel ORA_DISK_1: starting piece 1 at 10-DEC-09
channel ORA_DISK_1: finished piece 1 at 10-DEC-09
piece handle=/u01/app/oracle/bak/PROD/rman/PROD_30l0indi_1_1_20091210 tag=TAG20091210T164122 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 10-DEC-09

Starting backup at 10-DEC-09
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=33 RECID=107 STAMP=705256885
channel ORA_DISK_1: starting piece 1 at 10-DEC-09
channel ORA_DISK_1: finished piece 1 at 10-DEC-09
piece handle=/u01/app/oracle/bak/PROD/rman/PROD_31l0indl_1_1_20091210 tag=TAG20091210T164125 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-DEC-09

Starting Control File Autobackup at 10-DEC-09
piece handle=/u01/app/oracle/bak/PROD/rman/ctl_c-113838107-20091210-01 comment=NONE
Finished Control File Autobackup at 10-DEC-09

RMAN>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License