Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

machadmin is an administration utility which starts and ends Machbase server. It also creates and deletes database and checks whether the server is running or not.

Options and Features

The machadmin has options as follows. The functions that described in the installation chapter are omitted마크베이스 서버를 시작, 종료하거나 생성, 삭제 및 실행 상태를 체크하기 위해서는 machadmin을 사용한다.

옵션 및 기능

machadmin의 옵션은 아래와 같다.  앞의 설치 절에서 설명한 기능은 생략한다.


Code Block
mach@localhost:~$ machadmin -h

Table 1. machadmin options and features


Start up Machbase server./ Recovery mode (default: simple)
OptionDescription옵션설명
-u, --startup/ --recovery[=simple,complex,reset]Start up Machbase server./ Recovery 마크베이스 서버 시작/ 복구 mode (default기본: simple)Start up Machbase server./ Recovery mode (default: simple)

-s, --shutdown

마크베이스 서버 정상 종료
-c, --createdbCreate Machbase database.마크베이스 데이터베이스 생성
-d, --destroydbDestroy Machbase database.마크베이스 데이터베이스 삭제
-k, --killTerminate Machbase server.마크베이스 서버 강제 종료
-i, --silenceProduce less output.출력 없이 실행
-r, --restoreRestore Machbase database.백업에서 데이터베이스 복구
-x, --extractExtract BackupFile to BackupDirectory.백업 파일을 백업 디렉터리로 변환
-w, --viewimageDisplay information of BackupImageFile.백업 이미지 파일의 정보 출력
-e, --checkCheck whether Machbase server is running.마크베이스 서버 실행 체크
-t, --licinstallInstall license file.라이선스 파일 설치
-f, --licinfoDisplay information of the installed license file.

...

설치된 라이선스 정보 출력

복구 모드

Syntax:

Code Block
machadmin -u --recovery=[simple | complex | reset]

Available recovery modes are as follows:

  • Simple: Simple recovery mode is performed by default. If none is specified, simple mode will be performed unless there are power failures.

  • Complex: Complex recovery mode checks database much more thoroughly compared to the simple mode. It is executed when there is a power failure or stability of the system is at risk- In the case of a power failure, complex recovery mode automatically performs.

  • Reset: If a database is broken, search for the broken data in every table, and delete all the data starting from the location where the data is broken to the current one in order to maintain data integrity. In the case of broken database, reset recovery mode is useful, however, data loss is inevitable.

Shut down

Example:

...


복구 모드는 다음과 같다.

  • simple: 서버가 동작중일때 전원이 끊어지는 문제가 발생하지 않았다면, simple recovery 모드가 기본 실행된다. 

  • complex: complex recovery 모드는 simple 모드에 비해서 실행시간이 더 오래 걸린다. 전원이 끊어진 이후 재시작시에 기본으로 실행된다.

  • reset: simple 혹은 complex 모드로 복구가 수행되지 않을 때, 모든 테이블의 모든 데이터를 검사하여 데이터베이스를 복구한다. 이 경우, 데이터의 일부 유실이 발생할 수 있다.

서버 정상 종료

Example:

Code Block
languagetext
mach@localhost:~$ machadmin -s

-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 20152014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for the server shut down...
Server shut down successfully.

...


데이터베이스 생성

Example:

Code Block
languagetext
mach@localhost:~$ machadmin -c
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 20152014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Database created successfully.

...


데이터베이스 삭제

Example:

Code Block
languagetext
mach@localhost:~$ machadmin -d
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 20152014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Destroy Machbase database- Are you sure?(y/N) y
Database destroyed successfully.

...


서버 강제 종료

Syntax:

Code Block
machadmin -k


Example:

Code Block
languagetext
mach@localhost:~$ machadmin -k
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 2014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase terminated...
Server terminated successfully.

Silent mode

...

침묵 모드 실행

machadmin 실행시 출력되는 메시지를 없앤다.

Syntax:

Code Block
machadmin -i

...


데이터베이스 복구

Syntax:

Code Block
machadmin -r backup_database_path


Example:

Code Block
languagetext
mach@localhost:~$ machadmin -r 'backup'
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 20152014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Backed up database restored successfully.

...


백업 폴더로 변환

Syntax:

Code Block
machadmin -x backup_file extract_path


Extract files from a backup file 단일 백업 파일 (*.ib) to a backup folderibf)을 백업 디렉터리에 출력한다: -x backup_file extract_path.

단일 백업 파일로 백업한 경우, 디렉터리 형태의 백업으로 변환해야 백업 복구가 가능하다.

Example:

Code Block
languagetext
mach@localhost:~$ machadmin -x 'backup.ibf' 'backup'
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 20152014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Extract backup image successfully.

...


백업파일 정보 확인

Syntax:

Code Block
machadmin -w backup_file


Example:

Code Block
languagetext
mach@localhost:~$ machadmin -w 'backup'
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 2014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Display information of backup image file.
--------------------------------------------------------------
     File name        - mach_backup_19700101090000_20150805092853_1
     Create time      - 2015-08-04 15:35:56
     Data duration    - 1970-01-01 09:00:00 ~ 2015-08-05 09:28:53
     Backup duration  - 2015-08-05 09:28:53 ~ 2015-08-05 09:28:53
     Version          - DB(4.0) Meta(2.0) CM(1.5)
-----------------------------------------------------------------

...


서버 실행 유무 확인

Syntax:

Code Block
machadmin -e


Example of server not running서버가 실행중이지 않을 때의 출력 예

Code Block
languagetext
mach@localhost:~$ machadmin -e
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 2014,Machbase MACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
[ERR] Server is not running.


Example of server running서버가 실행중일 때의 출력 예

Code Block
languagetext
mach@localhost:~$ machadmin -e
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 2014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Machbase server is already running with PID (14098).

...

라이선스 파일 설치

Syntax:

Code Block
machadmin -t license_file


Example:

Code Block
languagetext
mach@localhost:~$ machadmin -t license.dat
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 2014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
License installed successfully.

...


라이선스 확인

Example:

Code Block
languagetext
mach@localhost:~$ machadmin -f
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.01.826b8f29.officialcommunity
     Copyright 2014, MachbaseMACHBASE IncCorp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
                   INFORMATION
Install DATEDate                      : 2016.02.17 13:58:542018-12-20 11:34:43
Company#ID-ProjectName            : machbase
License Policy                    : CORE
License Type(Version 2)           : OFFICIAL
Host ID                           : FFFFFFFFFFFFFFF
Issue DATEDate                        : 201303252013-03-25
Expiry DATEDate                       : 253003182037-03-18
Max Data Size For a Day(GB)       : 0
Percentage Of Data Addendum(%)    : 0
Overflow Action                   : 0
Overflow Count to Stop Per Month  : 0
Stop Action                       : 0
Reset Flag                        : 0
-----------------------------------------------------------------
                   STATUS
Usage Of Data(GB)                 : 0.000000
PreviousCheckedPrevious DATEChecked Date             : 201602162018-12-22
Violation Count                   : 0
Stop Enabled                      : 0
-----------------------------------------------------------------
License information displayed successfully.

...