메뉴 건너뛰기

조회 수 8583 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

RMAN 을 이용한 오라클 백업

Recover Manager(이한 RMAN) 은 오라클 데이터베이스에 대한 백업과 복구를 위한 클라이언트 프로그램이다. RMAN 는 크게 백업, 복원 및 데이터베이스 파일들에 대한 복구를 단순화한다.

데이터베이스 FULL 백업

다음의 스크립트는 로컬에 설치된 데이터베이스에 접속하여 /BACKUP/DATA 위치에 FULL 백업을 수행한다.

"FullBackup.sh"

OUSER=oracle

TS=`date +"%m.%d-%H:%M"`

su - $OUSER << EOF
rman log=/BACKUP/log/rman_FULL_$TS.log <<EOF1
connect target /
crosscheck archivelog all;
delete noprompt expired archivelog all;
delete noprompt obsolete;

run{
allocate channel t1 type DISK;
SET MAXCORRUPT FOR DATAFILE 3 to 3;
BACKUP format "/BACKUP/RMAN/FULL_%d_%U" INCREMENTAL LEVEL 0 DATABASE filesperset 4;
sql "alter database backup controlfile to ''/BACKUP/RMAN/controlfile_full_backup'' reuse";
sql "alter system archive log current";
backup format  "/BACKUP/RMAN/IRDS_%s.arc.rman"
archivelog all delete all input;
release channel t1;
}
EOF1

EOF


데이터베이스 아키이브 백업

다음의 스크립트는 로컬에 설치된 데이터베이스에 접속하여 /BACKUP/DATA 위치에 아카이브 백업을 수행한다.

"DailyBackup.sh"


OUSER=oracle

TS=`date +"%m.%d-%H:%M"`

su - $OUSER << EOF
rman log=/BACKUP/log/rman_INC_$TS.log <<EOF1
connect target /
crosscheck archivelog all;
delete noprompt expired archivelog all;

run{
allocate channel t1 type DISK;
SET MAXCORRUPT FOR DATAFILE 3 to 3;
BACKUP format "/BACKUP/RMAN/INC_%d_%U" INCREMENTAL LEVEL 1 DATABASE filesperset 4;
sql "alter database backup controlfile to ''/BACKUP/RMAN/controlfile_inc_backup'' reuse";
sql "alter system archive log current";
backup format  "/BACKUP/RMAN/DATABASE_%s.arc.rman"
archivelog all delete all input;
release channel t1;
}
EOF1
EOF



참고로 RMAN 은 catalog 을 이용하는 방법과 target database 의 controlfile 을 이용한 방법이 있으나 오라클에서는 catalog 를 이용하는 방법을 강력히 권고한다.

  1. Oracle에서 중복 조인을 피하기 위한 Update 방법 (MERGE 사용)

    Date2016.08.29 Views8145
    Read More
  2. PK 수정하기

    Date2016.09.12 Views7069
    Read More
  3. PL/SQL에서 자바(Java) 클래스(Class), 함수 실행 방법

    Date2016.12.08 Views9387
    Read More
  4. RMAN 을 이용한 오라클 백업

    Date2016.12.08 Views8583
    Read More
  5. ROLLUP 합계, 소계 구하기 (GROUP BY)

    Date2016.12.08 Views11869
    Read More
  6. rownum 사용 - 최근글 몇개만 가져오기

    Date2016.12.08 Views9984
    Read More
  7. rownum 으로 범위지정을 해주고 싶을 때

    Date2016.08.30 Views8624
    Read More
  8. SQL 작성을 위한 25가지 원칙

    Date2016.12.08 Views6909
    Read More
  9. SQL 쿼리문 보기 좋게 정렬해주는 사이트 - Instant SQL Formatter

    Date2016.08.29 Views10998
    Read More
  10. sqlplus에서 Ampersand나 특수 문자를 갖는 데이타를 insert하는 방법 sqlplus 데이터 insert 입력값 요구

    Date2016.12.08 Views8912
    Read More
  11. Toad 사용시 캐릭터 인코더 UTF-8 로 변경하기

    Date2016.08.30 Views10086
    Read More
  12. TOAD 에서 Edit 를 통해 sql문을 작성할때 참고해야할 View

    Date2016.08.30 Views7468
    Read More
  13. TOAD 에서 SQL Builder 을 사용하여 DML 문서 작성을 자동화 해본다

    Date2016.08.30 Views7507
    Read More
  14. Toad 에서 생성한 테이블의 컬럼위치를 변경하고 싶을 때 Rebuild Table 사용

    Date2016.08.30 Views7604
    Read More
  15. TOAD에서 Explain Plan 보기

    Date2016.09.12 Views8230
    Read More
  16. UNION ALL 과 ORDER BY 섞어서 쓰기

    Date2016.08.30 Views9899
    Read More
  17. V$SESSION 테이블 활용

    Date2016.09.12 Views8119
    Read More
  18. WHERE절에서 Null 값 비교하기

    Date2016.08.29 Views9354
    Read More
  19. WITH문으로 쿼리를 임시테이블이나 View처럼 사용하자.

    Date2016.08.29 Views8379
    Read More
  20. [Oracle 12g] 설치 후 오라클 관리자 계정 접속하기

    Date2016.12.08 Views10721
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7

하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved