RESTOREDB : 데이터베이스 복구

큐브리드 2009/06/27 00:46 Posted by 종이비행기
RESTOREDB

설명
RESTOREDB 명령은 기 백업된 데이터베이스 백업 파일을 이용하여 데이터베이스를 백업 시점으로 되돌리는 데 사용이 된다. 백업이 전체백업과 증분백업으로 백업을 하듯 복구도 백업레벨에 따라 복구가 가능하다.


구문
RESTOREDB 명령의 문법은 다음과 같다. 볼드체는 필수 입력 정보이다.

task:restoredb
token:{cmserver 인증후 받은 token 문자열}
dbname:{데이터베이스명}
date:{none or backuptime or dd-mm-yyyy:hh:mi:ss, 복원시점}
level:{백업레벨, 0:전체, 1,2:증분}
partial:{y or n, 완전한 로그가 없을 때 y옵션으로 부분 복원을 실행}
pathname:{백업 파일 경로}
recoverypath:{none, 8.1.4 현재 사용하지 않음}


예제
demodb 데이터베이스를 복구하는 예제 이다.

--request--
task:restoredb
token:4504b930fc1be99b9f38217a59ac6dfa30095b023d0c81a2918e032c738469ff7926f07dd201b6aa
dbname:demodb
date:backuptime
level:0
partial:n
pathname:/opt/frameworks/cubrid/databases/demodb/backup/demodb_backup_lv0
recoverypath:none

--response:success--
task:backupdb
status:success
note:none

--response:fail(Active상태의 DB명)--
task:restoredb
status:failure
note:Database(activedb) is active state.

--response:fail(존재하지 않는 DB명)--
task:restoredb
status:failure
note:Database "notexistdb" is unknown, or the file "databases.txt" cannot be accessed.
Restoredb cancelled or an error occurred.

--response:fai(존재하지 않는 백업파일)--
task:restoredb
status:failure
note:Unable to mount disk volume "/opt/frameworks/cubrid/databases/demodb/backup/demodb_backup_lv0_notexist".... No such file or directory
Please consult error_log file = /opt/frameworks/cubrid/log/demodb_restoredb.err for additional information
... ABORT/EXIT IMMEDIATELY ...<<<---
저작자 표시 비영리 변경 금지