참고하세여~
(1) dbexport 와 dbimport
- dbexport : ASCII 파일, dbschema 파일 생성
- dbimport : ASCII
- DBA 권한이나 informix 유저만 실행가능
- disk나 tape 으로 백업 가능
(2) dbexport 유틸리티
- db에 exclusive lock을 검!
- 병렬처리 안함
- -ss 옵션 => 서버의 특정 정보 보존 (테이블과 인덱스의 dbs위치, extent size, lock mode etc...)
- -b 옵션 => export blob descriptors only
(3) 예제
- 1-1. $ dbexport stores7 -ss (Enter!)
- 1-2. drop datebase stores7
- 1-3. $ dbimport stores7 (Enter!) => 복구 완료!
- 2. $ dbexport -t /dev/rmt0 -b 1024 -s 102400 -f /tmp/db.sql db_name (Enter!)
- 3. $ dbexport -t -c -o /work/exports superstores_demo -ss (Enter!) (-c: fatal error가 없다면 계속 진행시킴)
(-q 옵션: 스키마 받는 장면 보지 않기!)
(4) dbimport
- dbexport 된 것만 받을 수 있다.
- create and loads each table prior to building the indexes.
- 1. 첫 번째로 db생성, dbimport 시킨 유저가 DBA가 됨
2. 관련 schema 생성
3. data를 하나하나 시리얼하게 올림
(5) 예제
- 1. $ dbimport new_db -d <dbspace> -i /work/exports
- 2. $ dbimport stores7
(6) 성공 조언...
- 이기종, 작은 버전차이 조건에선 유효
- 서로 다른 machine에서 작업시 유효
- export 동안 logging을 off함 (빠른 select를 위해!)
- import 동안 PDQPRIORITY를 100으로 설정하는 것이 좋다
- 테입보다는 디스크가 좋다
도움 되셨기를...
|