The source to the tokudb backup plugin is in two repos:
github.com:percona/percona-tokubackup
github.com:percona/tokudb-backup-plugin
These two repo's need to be checked out and built with the mariadb server source. Here is an example on how to build the tokudb backup plugin into mariadb 10.1:
set -e
if [ ! -d mariadb-server ] ; then git clone git@github.com:mariadb/server mariadb-server; fi
if [ ! -d percona-tokubackup ] ; then git clone git@github.com:percona/percona-tokubackup; fi
if [ ! -d tokudb-backup-plugin ] ; then git clone git@github.com:percona/tokudb-backup-plugin; fi
pushd tokudb-backup-plugin
rm -rf backup
ln -s ../percona-tokubackup/backup
popd
pushd mariadb-server/plugin
if [ -d tokudb-backup-plugin ] ; then rm tokudb-backup-plugin; fi
rm -rf tokudb-backup-plugin
ln -s ../../tokudb-backup-plugin
popd
rm -rf build install
mkdir build install
pushd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install -DMYSQL_MAINTAINER_MODE=OFF ../mariadb-server
make -j8 install
popd
Need to preload the hot backup library:
LD_PRELOAD=$PWD/lib/libHotBackup.so bin/mysqld_safe --defaults-file=~/rfp.cnf --plugin-load-add=ha_tokudb.so --plugin-load-add=tokudb_backup.so &
Here is the user interface:
MariaDB [(none)]> show variables like 'version';
-----------------------------------+
-----------------------------------+
| version |
10.1.8-MariaDB-debug |
-----------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> show variables like 'tokudb_backup%';
------------------------------------------------------------------+
------------------------------------------------------------------+
| tokudb_backup_allowed_prefix |
|
| tokudb_backup_dir |
|
| tokudb_backup_exclude |
|
| tokudb_backup_last_error |
0 |
| tokudb_backup_last_error_string |
|
| tokudb_backup_plugin_version |
|
| tokudb_backup_throttle |
18446744073709551615 |
| tokudb_backup_version |
tokubackup 1.2 $Revision: 56100 $ |
------------------------------------------------------------------+
The source to the tokudb backup plugin is in two repos:
github.com:percona/percona-tokubackup
github.com:percona/tokudb-backup-plugin
These two repo's need to be checked out and built with the mariadb server source. Here is an example on how to build the tokudb backup plugin into mariadb 10.1:
set -e
if [ ! -d mariadb-server ] ; then git clone git@github.com:mariadb/server mariadb-server; fi
if [ ! -d percona-tokubackup ] ; then git clone git@github.com:percona/percona-tokubackup; fi
if [ ! -d tokudb-backup-plugin ] ; then git clone git@github.com:percona/tokudb-backup-plugin; fi
pushd tokudb-backup-plugin
rm -rf backup
ln -s ../percona-tokubackup/backup
popd
pushd mariadb-server/plugin
if [ -d tokudb-backup-plugin ] ; then rm tokudb-backup-plugin; fi
rm -rf tokudb-backup-plugin
ln -s ../../tokudb-backup-plugin
popd
rm -rf build install
mkdir build install
pushd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install -DMYSQL_MAINTAINER_MODE=OFF ../mariadb-server
make -j8 install
popd
Need to preload the hot backup library:
LD_PRELOAD=$PWD/lib/libHotBackup.so bin/mysqld_safe --defaults-file=~/rfp.cnf --plugin-load-add=ha_tokudb.so --plugin-load-add=tokudb_backup.so &
Here is the user interface:
MariaDB [(none)]> show variables like 'version';
--------------
---------------------+--------------
---------------------+--------------
---------------------+1 row in set (0.00 sec)
MariaDB [(none)]> show variables like 'tokudb_backup%';
--------------------------------
----------------------------------+--------------------------------
----------------------------------+--------------------------------
----------------------------------+