Oracle RMAN 채널 및 병렬 처리를 구성할 때는 Oracle RMAN 백업 채널에 대한 파일 시스템 대상과 백업 및 복원 작업에 사용되는 총 채널 수를 지정합니다. 사용 가능한 ZFS Storage Appliance 공유에 걸치는 Oracle RMAN 채널 16개를 구성하여 성능을 향상시킬 수 있습니다. Oracle Database 인스턴스 및 RAC 클러스터 내 노드에 고르게 분산되고 ZFS Storage Appliance에서 내보낸 공유에 고르게 분산되도록 Oracle RMAN 채널을 구성하십시오.
다음 코드 단편은 백업 세트와 이미지 복사본에 대해 백업 및 복원 작업을 수행하고 이미지 복사본에 증분 병합을 적용하기 위한 샘플 Oracle RMAN 실행 블록을 보여줍니다. 샘플 코드는 다음 데이터베이스 구성을 기반으로 합니다.
데이터베이스 이름: dbname
SYSDBA 로그인: sys/welcome
SCAN 주소: ad01-scan
백업에 대한 서비스 이름: dbname_bkup
어플라이언스가 8개 마운트 지점으로 사용되는 8개 공유를 내보내는 1풀 구성에서 ZFS Storage Appliance를 구성할 수 있습니다.
백업 세트와 이미지 복사본을 사용하는 백업 및 복원에 대한 Oracle RMAN 실행 블록은 다음 절의 예에서 확인할 수 있습니다. 해당 예에서는 /zfssa/dbname/backup1 - /zfssa/dbname/backup4로 4공유 구성에 대한 마운트 지점에 액세스합니다. 또한 해당 예를 통해 ZFS Storage Appliance가 16개 Oracle RMAN 채널에 대한 4개 마운트 지점으로 사용되는 4개 공유를 내보내는 구성을 확인할 수 있습니다.
백업 세트 레벨 0 백업:
run {<br/> sql ’alter system set "_backup_disk_bufcnt"=64 scope=memory’;<br/> sql ’alter system set "_backup_disk_bufsz"=1048576 scope=memory’;<br/> allocate channel ch01 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch02 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch03 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch04 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch05 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch06 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch07 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch08 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch09 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch10 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch11 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch12 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch13 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch14 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch15 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch16 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup3/%U’;<br/> configure snapshot controlfile name to<br/> ’/zfssa/dbname/backup1/snapcf_dbname.f’;<br/> backup as backupset incremental level 0 section size 32g database<br/> tag ’FULLBACKUPSET_L0’ plus archivelog tag ’FULLBACKUPSET_L0’; }
백업 세트 레벨 1 백업:
run {<br/> sql ’alter system set "_backup_disk_bufcnt"=64 scope=memory’;<br/> sql ’alter system set "_backup_disk_bufsz"=1048576 scope=memory’;<br/> allocate channel ch01 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch02 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch03 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch04 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch05 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch06 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch07 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch08 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch09 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch10 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch11 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch12 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch13 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch14 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch15 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch16 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup3/%U’;<br/> configure snapshot controlfile name to<br/> ’/zfssa/dbname/backup1/snapcf_dbname.f’;<br/> backup as backupset incremental level 1 database tag<br/> ’FULLBACKUPSET_L1’ plus archivelog tag ’FULLBACKUPSET_L1’; }
이미지 복사본 백업:
run {<br/> sql ’alter system set "_backup_file_bufcnt"=64 scope=memory’;<br/> sql ’alter system set "_backup_file_bufsz"=1048576 scope=memory’;<br/> allocate channel ch01 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch02 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch03 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch04 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch05 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch06 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch07 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch08 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch09 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch10 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch11 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch12 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup3/%U’;<br/> allocate channel ch13 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup2/%U’;<br/> allocate channel ch14 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup1/%U’;<br/> allocate channel ch15 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’ format ’/zfssa/dbname/backup4/%U’;<br/> allocate channel ch16 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’ format ’/zfssa/dbname/backup3/%U’;<br/> configure snapshot controlfile name to<br/> ’/zfssa/dbname/backup1/snapcf_dbname.f’;<br/> backup incremental level 1 for recover of copy with tag ’IMAGECOPY’<br/> database; }
이미지 복사본에 대한 증분 병합:
run {<br/> sql ’alter system set "_backup_disk_bufcnt"=64 scope=memory’;<br/> sql ’alter system set "_backup_disk_bufsz"=1048576 scope=memory’;<br/> sql ’alter system set "_backup_file_bufcnt"=64 scope=memory’;<br/> sql ’alter system set "_backup_file_bufsz"=1048576 scope=memory’;<br/> allocate channel ch01 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch02 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch03 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch04 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch05 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch06 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch07 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch08 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch09 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch10 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch11 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch12 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch13 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch14 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch15 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch16 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> configure snapshot controlfile name to<br/> ’/zfssa/dbname/backup1/snapcf_dbname.f’;<br/> recover copy of database with tag ’IMAGECOPY’; }
복원 검증:
run {<br/> sql ’alter system set "_backup_disk_bufcnt"=64 scope=memory’;<br/> sql ’alter system set "_backup_disk_bufsz"=1048576 scope=memory’;<br/> sql ’alter system set "_backup_file_bufcnt"=64 scope=memory’;<br/> sql ’alter system set "_backup_file_bufsz"=1048576 scope=memory’;<br/> allocate channel ch01 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch02 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch03 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch04 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch05 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch06 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch07 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch08 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch09 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch10 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch11 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch12 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch13 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch14 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> allocate channel ch15 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup1’;<br/> allocate channel ch16 device type disk connect ’sys/welcome@ad01-<br/> scan/dbname_bkup2’;<br/> configure snapshot controlfile name to<br/> ’/zfssa/dbname/backup1/snapcf_dbname.f’;<br/> restore validate database; }