공부이야기

BDB 복구

coyotek 2008. 9. 26. 09:57
 
  • bdb복구
    • 디렉토리가 /data/fsesdata일때
    • db_recover -c -v -h /data/fsesdat

오역이 있을지 몰라 발췌한 내용은 그대로 둠.

 

db_recover [-cefVv] [-h home] [-P password] [-t [[CC]YY]MMDDhhmm[.SS]]]

 

설명 : 예기치 않은 상황에서 DB 뻗었을 복구 하면 commit 된건 모두 살아나지만 commiitted 되지않은 트랜잭션은 온전히 완료되지 않음

 

옵션 설명 :

 

-c

Perform catastrophic recovery instead of normal recovery.

일반적인 복구가 아니고 완전 작살 났다고 판단될 때 사용

 

-e

Retain the environment after running recovery. This option will rarely be used unless a DB_CONFIG file is present in the home directory. If a DB_CONFIG file is not present, then the regions will be created with default parameter values.

복구 수행 후 환경을 유지. DB_CONFIG 파일이 디렉토리에 있으면 거의 사용되지 않음. DB_CONFIG 파일이 없고 기본 세팅 값으로 새로운 홈디렉토리에 생성될 사용

 

-f(4.4이하 버젼은 지원 안함)

Display a message on the standard output showing the percent of recovery completed.

복구가 끝났을 때 복구된 퍼센티지를 터미널에 디스플레이

 

-h

Specify a home directory for the database environment; by default, the current working directory is used.

작업할 디비의 홈디렉토리 설정. 기본값은 현재 작업중인 디렉토리

 

-P

Specify an environment password. Although Berkeley DB utilities overwrite password strings as soon as possible, be aware there may be a window of vulnerability on systems where unprivileged users can see command-line arguments or where utilities are not able to overwrite the memory containing the command-line arguments.

디비 환경의 비밀번호 설정. 버클리 DB 유틸들은 가능하면 비밀번호를 덮어쓰긴 하지만 보안상 취약한 부분이 있음(그래서 어쩌라고...)

 

-t

Recover to the time specified rather than to the most current possible date. The timestamp argument should be in the form [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the following:

가장 최근의 복구 가능한 시간이 아닌 설정된 시간으로 복구. 타임스탬프는 다음 형태로 지정 [[CC]YY]MMDDhhmm[.SS]

 

CC

The first two digits of the year (the century).

년도에서 처음 두자리

 

YY

The second two digits of the year. If "YY" is specified, but "CC" is not, a value for "YY" between 69 and 99 results in a "CC" value of 19. Otherwise, a "CC" value of 20 is used.

년도에서 다음 두자리 CC 지정이 안된 상태에서 YY 69~99 사이로 지정되면 CC 19 아니면 20으로 자동 세팅

 

MM

The month of the year, from 1 to 12.

1~12 설정

 

DD

The day of the month, from 1 to 31.

1~31 설정

 

hh

The hour of the day, from 0 to 23.

0~23으로 시간 설정

 

mm

The minute of the hour, from 0 to 59.

0~59 설정

 

SS

The second of the minute, from 0 to 61.

If the "CC" and "YY" letter pairs are not specified, the values default to the current year. If the "SS" letter pair is not specified, the value defaults to 0.

0~61 설정. CC YY 설정 안되어 있으면 현재 년도가 기본값으로 사용됨. SS 설정을 안하면 기본값으로 0 사용됨

 

-V

Write the library version number to the standard output, and exit.

기본 출력에 라이브러리 버젼 번호를 쓰고 나감.(먼소리야...)

 

-v

Run in verbose mode.

verbose 모드로 실행