COPYDB : 데이터베이스 복사

큐브리드 2009/06/27 19:34 Posted by 종이비행기
COPYDB

설명
COPYDB 명령은 동일한 내용의 데이터베이스를 다른 데이터베이스 이름으로 복제하는 용도로 사용이 된다.


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

task:copydb
token:{cmserver 인증후 받은 token 문자열}
srcdbname:{원본 데이터베이스명}
destdbname:{사본 데이터베이스명}
destdbpath:{사본 데이터베이스 경로}
exvolpath:{사본 데이터베이스의 확장볼륨 경로}
logpath:{사본 데이터베이스의 로그파일 경로}
overwrite:{y or n, y:동일 데이터베이스 존재시 엎어쓰기}
move:{y or n, y:복사후 원본 데이터베이스 삭제}
advanced:{on or off, on:개별 볼륨 복사 설정}


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

--request--
task:copydb
token:4504b930fc1be99b94029b09d9d7d0359c67a25d9160f9b1918e032c738469ff7926f07dd201b6aa
srcdbname:demodb
destdbname:newdb
destdbpath:/opt/frameworks/cubrid/databases/newdb
exvolpath:/opt/frameworks/cubrid/databases/newdb
logpath:/opt/frameworks/cubrid/databases/newdb
overwrite:n
move:n
advanced:off

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

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

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

--response:fail(확장볼륨 경로 미입력)--
task:copydb
status:failure
note:Parameter(extended volume path) missing in the request

--response:fail(로그볼륨 경로 미입력)--
task:copydb
status:failure
note:Parameter(log path) missing in the request

※ destdbname에 입력된 DB이름이 이미 존재하는 데이터베이스가 있을 때에도 에러가 발생되지는 않는다. overwrite:y 옵션을 사용해야만 정상적으로 복사가 된다.
저작자 표시 비영리 변경 금지