Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

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.

mach@localhost:~$ machadmin -h

Table 1. machadmin options and features

OptionDescription
-u, --startup/ --recovery[=simple,complex,reset]Start up Machbase server./ Recovery mode (default: simple)
Start up Machbase server./ Recovery mode (default: simple)Start up Machbase server./ Recovery mode (default: simple)
-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.

Recovery Mode

Syntax:

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:

mach@localhost:~$ machadmin -s

-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2015, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for the server shut down...
Server shut down successfully.

Create a database

Example:

mach@localhost:~$ machadmin -c
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2015, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Database created successfully.

Destory a database

Example:

mach@localhost:~$ machadmin -d
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2015, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Destroy Machbase database- Are you sure?(y/N) y
Database destroyed successfully.

Kill a server

Syntax:

machadmin -k

Example:

mach@localhost:~$ machadmin -k
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase terminated...
Server terminated successfully.

Silent mode

It is useful when it runs on external utilities without using machadmin message.

Syntax:

machadmin -i

Restore a database

Syntax:

machadmin -r backup_database_path

Example:

mach@localhost:~$ machadmin -r 'backup'
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2015, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Backed up database restored successfully.

Extract files

Syntax:

machadmin -x backup_file extract_path

Extract files from a backup file (*.ib) to a backup folder: -x backup_file extract_path

Example:

mach@localhost:~$ machadmin -x 'backup.ibf' 'backup'
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2015, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Extract backup image successfully.

Check the contents of backup file

Syntax:

machadmin -w backup_file

Example:

mach@localhost:~$ machadmin -w 'backup'
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. 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)
-----------------------------------------------------------------

Check if server is running

Syntax:

machadmin -e

Example of server not running

mach@localhost:~$ machadmin -e
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014,Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
[ERR] Server is not running.

Example of server running

mach@localhost:~$ machadmin -e
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Machbase server is already running with PID (14098).

Install a license file on server

Syntax:

machadmin -t license_file

Example:

mach@localhost:~$ machadmin -t license.dat
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
License installed successfully.

Check the status of installed license

Example:

mach@localhost:~$ machadmin -f
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
                   INFORMATION
Install DATE                      : 2016.02.17 13:58:54
Company#ID-ProjectName : machbase
License Policy                    : CORE
License Type(Version 2)           : OFFICIAL
Host ID                           : FFFFFFFFFFFFFFF
Issue DATE                        : 20130325
Expiry DATE                       : 25300318
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
PreviousChecked DATE              : 20160216
Violation Count                   : 0
Stop Enabled                      : 0
-----------------------------------------------------------------
License information displayed successfully.
  • No labels