Versions Compared

Key

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

...

DURATION조건절을 이용하여 백업 대상을 지정할 수 있다. 백업 대상 데이터의 시작 시간과 끝 시간을 FROM및 TO절에서 지정한다. 위 예제에서  "2015-0714 00:00:00" 가 FROM으로 정의되었고, "2015-07-14 23:59:59" 이 TO로 정의되었으므로, 사용자는 2015년 7월 14일의 전체 데이터를 백업하는 것이다. time duration절에 아무 것도 정의되어 있지 않다면 "1970-01-01 00:00:00" 이 FROM으로 설정되고 실행되는 현재 시점이 TO절에 설정된다.

In the case of example above, "2015-0714 00:00:00" is set in FROM and "2015-07-14 23:59:59" in TO from time_duration syntax so that the user can back up the data for 14th of July in 2015. If none is specified for time_duration, "1970-01-01 00:00:00" will be applied to FROM and the time when you are executing the command will be applied TO.

Now, you need to select the storage medium for backup results. If you want to create the backup with a single file, set to "IBFILE" and set to "DISK" if you want to create it as directory. Caution should be exercised when setting up the path for the backup storage. That is, if you set a relative path, the path will be created in 백업 파일을 단일 파일로 생성하려면 "IBFILE"을 여러개의 파일과 디렉토리로 생성하려면 "DISK"를 백업 옵션에 지정한다. 백업 경로를 지정할 때, 상대 경로를 지정하면 "$MACHBASE_HOME/dbs" of database environments which is currently running. If you want to store the data in other locations rather than "$MACHBASE_HOME/dbs", it is required to type in the absolute path starting with "/" symbol.

Restore a Database

Database restoration cannot be provided as statements, rather it can restore data via "machadmin -r" from an offline. Check the followings before the restoration:

...

아래에 백업 파일들이 생성되므로 주의하여야 한다. 절대 경로를 지정하려면 항상 "/"로 시작되는 패스를 설정하여야 한다.

데이터베이스 복구

백업파일에서 데이터 복원을 수행할때는 질의 명령으로 수행할 수 없으며, "machadmin -r" 명령을 database가 동작하지 않는 상황에서 실행해야 한다. 백업 실행 이전에 다음의 조건들을 검토해야 한다.

  • 마크베이스 데이터베이스가 shutdown상태인가
  • 현재의 데이터는 삭제되고 복구할 데이터로 대치되므로, 현재 데이터베이스의 삭제가 허용되는가

Syntax:

Code Block
machadmin -r backup_database_path

...

Code Block
 backup database into disk = '/home/machbase/backup';

 machadmin -k
 machadmin -d
 machadmin -r /home/machbase/backup;

Extract as a Single File

...


단일 백업 파일 추출

단일 백업 파일(IBFILE)은 바로 복구에 사용할 수가 없으며, 복구 이전에 반드시 추출 과정으로 디렉토리 백업형태로 전환하여야 한다. "machadmin" 도구로 데이터를 추출하고 나면 백업 파일들은 "target_path/backup_file_name/" directory디렉토리에 생성된다.

Syntax:

Code Block
machadmin	-x	single_file_backup_file_name	extract_target_path

Example:

Retrieve Information of a Single Backup File

...

단일 백업 파일의 정보 확인

백업 명령으로 생성한 단일 백업 파일의 정보는 machadmin -w명령으로 확인할 수 있다.

Syntax:

Code Block
machadmin	-w	single_backup_file_name

...

Code Block
machadmin -w ib_backup01
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.0.0 official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Display information of Backup Image successfully.
-----------------------------------------------------------------
     File name        - mach_backup_19700101090000_20150725142017_3
     Create time      - 2015-07-25 14:19:22
     Data duration    - 1970-01-01 09:00:00 ~ 2015-07-25 14:20:17
     Backup duration  - 2015-07-25 14:20:18 ~ 2015-07-25 14:20:18
     Version          - DB(4.0) Meta(1.6) CM(1.5)
---------------------------------------------------------

The displayed information are name of backup file, date of creation, the starting point of backup file to backup, the ending point of backup file to ends the backup operation, and the current version of the database. Machbase offers two options for backing up your data표시된 정보는 백업 파일의 이름, 생성 날자, 백업된 데이터의 시작 시간, 마지막 시간, 그리고 백업된 데이터베이스의 버전이 표시된다.