백업파일을 이용하여 데이터베이스가 없는 다른 서버에서 복구하는 방법 질문.

by 김우람 posted Mar 19, 2009

큐브리드 매니저의 "작업자동화->백업자동화" 기능을 이용하여
dlife_auto_backup_lv0 , dlife_auto_backup_lv1 이 두개의 백업 파일을 생성하였습니다.

http://www.cubrid.com/zbxe/32215

위 게시글의 내용을 토대로 다른 서버에서 백업파일만으로 복구를 시도하려고 하는데
몇 가지 의문점이 들어 질문을 올립니다.

-------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. 데이터베이스 백업화일을 임의의 위치에 복사한다. 이때 가장 마지막 백업본을 사용한다.
 단 마지막 백업이 풀(level 0) 백업이 아닌 경우 현재 레벨 이전의 모든 백업본이 필요하다.
 예를 들어 현재 백업본이 level 2 라면 level 0, level 1 모두 필요하다.
 디폴트로 백업시 백업화일명은 demodb_bk0v000 형식이며, 이때 bk 다음 v 앞의 숫자가 level 이다.
 0v 이면 level 0 백업 화일이다.
      /tmp 아래에 복사한 것으로 가정.
  5. 데이터베이스 복구 명령을 수행한다. 마지막 백업이 level 0 일 경우에는 아래와 같이 수행한다.
     % cubrid restoredb -B /tmp -p demodb
     만약 마지막 백업이 level 2 라면 아래와 같이 수행한다.
     % restoredb -l 2 -B /tmp -p demodb
--------------------------------------------------------------------------------------------------------------------------------------------------------------

위와 같이 설명이 되어 있어서 서버에 다음과 같은 명령을 주었습니다.

" D:cubrid_backup>cubrid restoredb -l 1 -B dlife_auto_backup_lv1 -p dlife "

그랬더니 다음과 같은 메세지가 나타났습니다.

** WARNING ** Incorrect backup volume mounted.
Backup volume dlife_auto_backup_lv1 is from another backup level
   (Level: 1, expecting 0).
*************************************************************************
The following database backup volume is needed to continue restoring:

Database Name: C:CUBRIDDATABA~1dlifedlife
     Volume Name: dlife_auto_backup_lv1
        Unit Num: 0
    Backup Level: 0 (FULL LEVEL)
Enter one of the following options:
Type
   -  0 to quit.
   -  1 to continue after the volume is mounted/loaded. (retry)
   -  2 to continue after changing the volume's directory or device.

*************************************************************************


여기서 0을 눌러서 멈췄습니다.

0
An error occurred during a database restore, while processing
     Backup Volume: dlife_auto_backup_lv1
          Unit Num: 0
   Database Volume: C:CUBRIDdatabasesdlifedlife_lgat_001_tmp
    Database Volid: -1
** WARNING: Do not use the database until an error-free restore is achieved.

--->>>
*** FATAL ERROR ***
Media recovery may be needed on volume "C:CUBRIDDATABA~1dlifedlife_bkvinf"
Please consult error_log file = cub_server.err for additional information
... ABORT/EXIT IMMEDIATELY ...<<<---



그 후 큐브리드 디렉토리(C:CUBRIDdatabasesdlife)를 살펴보니 몇몇 파일이 생성되기는 하였으나 데이타베이스가 정상적으로 동작하지 않았습니다.

그래서 데이타베이스 종료 후 큐브리드 디렉토리(C:CUBRIDdatabasesdlife)의 파일을 삭제하고
다시
" D:cubrid_backup>cubrid restoredb -l 0 -B dlife_auto_backup_lv0 -p dlife "
실행 그 후 다시
" D:cubrid_backup>cubrid restoredb -l 1 -B dlife_auto_backup_lv1 -p dlife "

명령을 실행하였더니 파일이 생성되고 데이타 베이스가 동작하였으나 위 명령어 실행도중 여전히 같은 에러 메세지가 발생하여 정상적으로 데이타베이스가 복구가 된 것인지 궁금하여 질문을 드립니다.


다음은 실행 도중 나타난 에러 메세지들 입니다.


 

D:cubrid_backup>cubrid restoredb -l 0 -B dlife_auto_backup_lv0 -p dlife
Unable to mount disk volume "C:CUBRIDDATABA~1dlifedlife_lgar011".... No such file or directory
Continue without present archive. (Partial recovery).

CUBRID 2008 R1.3


D:cubrid_backup>cubrid restoredb -l 1 -B dlife_auto_backup_lv1 -p dlife
** WARNING ** Incorrect backup volume mounted.
Backup volume dlife_auto_backup_lv1 is from another backup level
   (Level: 1, expecting 0).


*************************************************************************
The following database backup volume is needed to continue restoring:

Database Name: C:CUBRIDDATABA~1dlifedlife
     Volume Name: dlife_auto_backup_lv1
        Unit Num: 0
    Backup Level: 0 (FULL LEVEL)
Enter one of the following options:
Type
   -  0 to quit.
   -  1 to continue after the volume is mounted/loaded. (retry)
   -  2 to continue after changing the volume's directory or device.

*************************************************************************

여기서 0을 눌러서 멈췄습니다.
0

An error occurred during a database restore, while processing
     Backup Volume: dlife_auto_backup_lv1
          Unit Num: 0
   Database Volume: C:CUBRIDdatabasesdlifedlife_lgat_001_tmp
    Database Volid: -1
** WARNING: Do not use the database until an error-free restore is achieved.

--->>>
*** FATAL ERROR ***
Media recovery may be needed on volume "C:CUBRIDDATABA~1dlifedlife_bkvinf"
Please consult error_log file = cub_server.err for additional information
... ABORT/EXIT IMMEDIATELY ...<<<---


 


Articles

5 6 7 8 9 10 11 12 13 14