본문 바로가기

빅데이터과정/WORKSHOP 2

#26_140718_WSHOP2_RETENTION

728x90

# RETENTION






지워도 되는 백업본은 어떻게 결정이 되느냐


답 백업본의 보유(retention) 정책에 의해서 결정이 된다




Recovery window

RMAN> configure retention policy to recovery window of 7 days;
위의 명령어는 일주일전으로 DB를 복구할 수 있도록 백업본을 유지시키겠다즉 그러면 다른 백업본들은 지워도 되는 파일리스트에(report obsolete) 나타난다

RMAN> configure retention policy to recovery window of 2 days;
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
new RMAN configuration parameters are successfully stored
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 2 days
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          1      15-JUL-14          /u01/app/oracle/flash_recovery_area/DBDB/archivelog/2014_07_15/o1_mf_1_7_9w9s6dm6_.arc
Archive Log          2      15-JUL-14          /u01/app/oracle/flash_recovery_area/DBDB/archivelog/2014_07_15/o1_mf_1_8_9w9s6f1n_.arc
Archive Log          3      15-JUL-14          /u01/app/oracle/flash_recovery_area/DBDB/archivelog/2014_07_15/o1_mf_1_9_9w9s6hgn_.arc
Control File Copy     1      15-JUL-14          /home/oracle/control0715.bak


redundancy

RMAN> configure retention policy to redundancy 2;
똑 같은 백업본을 항상 2개로 유지하겠다즉 똑 같은 내용의 백업본이 2개 이상이 되면 나머지는 지워도 되는 파일 리스트에 나타난다

위와 같은 백업 보존정책 설정이 현재 어떻게 되어있는지 확인하는 명령어는?


RMAN> show all;
RMAN configuration parameters for database with db_unique_name DBDB are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_dbdb.f'; # defaul