Backup and Restore

waterguo edited this page Dec 5, 2017 · 2 revisions

Backup and restore of AntsDB can be achieved in two different ways.

mysqldump

mysqldump is the official command line utility for backing up database for MySQL. It can also be used with AntsDB. On Linux, the utility can be found in package mysql in most of the distributions. On Windows, it is included in the standard MySQL installation.

AntsDB can be backed up using the command below for example where test is the name of the database that is going to be backed up.

mysqldump -h 127.0.0.1 test > dump.sql

Compression can be enabled as well during the backup. Below is an example

mysqldump -h 127.0.0.1 test | gzip > dump.sql.gz

To restore the database, follow the example below where test is the name of the database where the dump is going to be restored. Be noted, database must be created before the restore process.

gzip < dump.sql.gz | mysql -h 127.0.0.1 test

HBase Backup and Restore

AntsDB can also be backed up using the methods suggested by HBase - HBase Backup. To properly backup AntsDB, follow the steps below

  1. Shutdown AntsDB
  2. Use one of the backup methods suggested by HBase

To restore AntsDB, use the hbase-relink command line.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.