on
Oracle 11g R2 RAC PSU 패치전 백업 가이드
Oracle 11g R2 RAC PSU 패치전 백업 가이드
반응형
OS환경 : Oracle Linux 7.4 (64bit)
DB 환경 : Oracle Database 11.2.0.4 RAC
방법 : Oracle 11g R2 RAC PSU 패치전 백업 가이드
11gR2 RAC 환경에서 PSU 패치 전에 백업해야할 파일 목록을 정리함
백업 파일은 패치하려는 각 노드에서 별도로 백업해야함
1. OLR 백업(각 노드 수동 백업)
1 2 3 4 5 # ocrconfig - local - manualbackup rac1 2021 / 10 / 20 02 : 54 : 05 / app / grid / product / 11. 2. 0 / grid / cdata / rac1 / backup_20211020_025405.olr rac1 2018 / 03 / 08 01 : 58 : 21 / app / grid / product / 11. 2. 0 / grid / cdata / rac1 / backup_20180308_015821.olr
오라클 11g R2 GRID OLR 백업 복구(https://positivemh.tistory.com/768) 참조
OLR 백업본 복구
1 # ocroncifg - local - restore < filename >
2. OCR 백업
Oracle Clusterware는 4시간마다 자동으로 OCR 백업을 생성함
Oracle Database는 항상 OCR의 마지막 3개 백업 복사본을 유지함
백업을 생성하는 CRSD 프로세스는 또한 매일 및 매주 주말에 OCR 백업을 생성하고 유지함
복원에 필요한 파일 백업의 일부로 OCR 백업을 수행하는 것이 좋음
1 2 3 4 5 6 7 8 9 10 11 12 13 # ocrconfig - manualbackup rac2 2021 / 10 / 20 04 : 10 : 53 / app / grid / product / 11. 2. 0 / grid / cdata / rac - cluster / backup_20211020_041053.ocr # ocrconfig - showbackup rac1 2021 / 10 / 20 02 : 48 : 11 / app / grid / product / 11. 2. 0 / grid / cdata / rac - cluster / backup00.ocr rac1 2021 / 10 / 20 02 : 48 : 11 / app / grid / product / 11. 2. 0 / grid / cdata / rac - cluster / day.ocr rac1 2021 / 10 / 20 02 : 48 : 11 / app / grid / product / 11. 2. 0 / grid / cdata / rac - cluster / week.ocr rac2 2021 / 10 / 20 04 : 10 : 53 / app / grid / product / 11. 2. 0 / grid / cdata / rac - cluster / backup_20211020_041053.ocr
OCR 백업본 복구
1 2 3 4 5 # crsctl start crs - excl( 11. 2. 0. 1의 경우) 또는 # crsctl start crs - excl - nocrs( 11. 2. 0. 2 이상 의 경우) # ocrconfig - restore < 파일 이름 >
grid 재기동
1 2 # crsctl stop crs - f # crsctl start crs
3. GRID 엔진 백업
1 # cp - pr $GRID_HOME 백업경로
또는 tar 명령으로 백업
1 2 3 4 # tar cpfz / 백업경로 / gridhome.tar.gz $GRID_HOME 또는 - z 옵션이 tar 배포판에서 지원되지 않는 경우 # tar cpf - $GRID_HOME | gzip - c > / 백업경로 / gridhome.tar.gz
4. GRID 관련 파일 백업(CRS가 제대로 작동하는 데 필요한 스크립트 및 파일)
Init scripts : 이 파일은 ohasd 데몬을 시작하는 데 사용됨. 이 데몬은 다른 클러스터웨어 프로세스를 추가로 생성함
Inittab 파일 : inittab 파일은 부팅 시와 정상 작동 중에 시작되는 프로세스를 설명함. 이 파일에는 Init.ohasd 스크립트가 등록되어 있음
SCRBASE 파일(Control files이라고도 함) : 이 파일은 ohasd의 자동 시작과 같은 ohasd 및 클러스터웨어의 일부 측면을 제어하는 데 사용됨
중앙 인벤토리 위치(Central Inventory Location) : 위치는 플랫폼에 따라 /etc/oraInst.loc 또는 /var/opt/oracle/oraInst.loc의 매개변수 inventory_loc에 의해 정의됨
oratab : oratab이 있는 디렉토리.
+ init scripts, inittab 및 SCRBASE 파일은 Grid Infrastructure rootcrs.pl -deconfig를 실행한 다음 root.sh를 실행하여 다시 생성할 수 있음
Init scripts 백업
1 2 3 4 5 6 7 8 #
cp - p / etc / init.d / init.ohasd $BKUPDIR cp - p / etc / init.d / ohasd $BKUPDIR cp - p / etc / inittab $BKUPDIR + RHEL / OEL 6의 경우 / etc / init / oracle - ohasd.conf 및 / etc / init / oracle - tfa.conf도 있음 RHEL / OEL 7의 경우 / etc / systemd / system / ohasd.service를 백업해야함 RHEL / OEL 7. 6의 경우 12. 2에서 ... / .. / tfa_home / install의 백업을 수행해야함
SCRBASE 백업
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # cp - p / etc / oracle / setasmgid 백업경로 cp - pr / opt / oracle 백업경로 cp - pr / etc / oracle / lastgasp 백업경로 cp - pr / etc / oracle / oprocd 백업경로 cp - pr / etc / oracle / scls_scr 백업경로 cp - p / etc / oracle / ocr.loc 백업경로 cp - p / etc / oracle / olr.loc 백업경로 아래는 / etc / init.d / ohasd를 가리키는 소프트 링크임 / etc / rc0.d / K15ohasd / etc / rc1.d / K15ohasd / etc / rc2.d / K15ohasd / etc / rc3.d / K15ohasd / etc / rc3.d / S96ohasd / etc / rc4.d / K15ohasd / etc / rc5.d / K15ohasd / etc / rc5.d / S96ohasd / etc / rc6.d / K15ohasd
asmlib 를 사용 하는 경우 아래 파일 백업
1 2 3 / etc / rc.d / init.d / oracleasm / usr / lib / oracleasm / opt / oracle / extapi / 64 / asm / orcl / 1 / libasm.so
중앙 인벤토리 백업
1 2 3 4 5 6 7 # cp - p / etc / oraInst.loc 백업경로 cat / etc / oraInst.loc | grep inventory_loc inventory_loc = / home / ogrid / app / oraInventory cp - pr / home / ogrid / app / oraInventory 백업경로
oratab 백업
1 # cp - p / etc / oracle / oratab 백업경로
LINUX가 아닌 OS의 경우 1482803.1 문서 참고해서 백업을 진행해야함
5. db 엔진 백업
1 2 $ cd $ORACLE_HOME $ tar - cvf ora_home_20211020.tar *
오라클 11g R2 엔진 백업 복구 테스트(https://positivemh.tistory.com/669) 참조
참조 : 1482803.1, 428681.1
https://positivemh.tistory.com/715
https://positivemh.tistory.com/768
https://positivemh.tistory.com/669
from http://positivemh.tistory.com/769 by ccl(A) rewrite - 2021-10-20 19:26:59