본문 바로가기

빅데이터과정/WORKSHOP 2

#27_140721_WSHOP2_RMAN 설정 관리

728x90

# RMAN 설정 관리



  • 지속 설정 관리





controlfile 자동백업되는 설정

RMAN> configure controlfile autobackup clear;
default 명령어
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN configuration parameters are successfully reset to default value

RMAN> show controlfile autobackup format;
format 확인
RMAN configuration parameters for database with db_unique_name DBDB are:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

RMAN> configure controlfile autobackup on;
autubackup 활성화
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored





  • exclude 설정


특정 테이블 스패이스를 백업의 대상에서 제외

RMAN> configure exclude for tablespace example;
Tablespace EXAMPLE will be excluded from future whole database backups
new RMAN configuration parameters are successfully stored

RMAN> show exclude;
RMAN configuration parameters for database with db_unique_name DBDB are:
CONFIGURE EXCLUDE FOR TABLESPACE 'EXAMPLE';




exclude clear

RMAN> configure exclude for tablespace example clear;
Tablespace EXAMPLE will be included in future whole database backups
old RMAN configuration parameters are successfully deleted

RMAN> show exclude;
RMAN configuration parameters for database with db_unique_name DBDB are:
RMAN configuration has no stored or default parameters





  • parellelism backup


RMAN> configure device type disk parallelism 3;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
RMAN> backup datafile 1;
Starting backup at 21-JUL-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=54 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=49 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=46 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
……………………………………………………………………
parallelism 을 3으로 설정했기 때문에 disk가 3개가 나오는 것을 확인할 수 있다




  • optimization


- optimization 은 환경구성을 설정하면 백업시 백업 속도를 높이면서 백업공간 사용 을 절약하는 목적이 있다

- 이 환경구성을 설정하면 백업을 할 때 지난번 백업으로부터 변경되지 않은 테이블 스패이스들은 백업에 포함시키지 않는다

RMAN> configure backup optimization on;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored

RMAN> show all;
RMAN configuration parameters for database with db_unique_name DBDB are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 2 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
……………………………………………………………………