Percona5.7 Tokubackup supports TOKUDB hot backup
First, install the TOKUDB engine
Execute the following script to install TOKUDB automatically.
# bin/ps-admin --defaults-file=/etc/my3308.cnf --enable -uroot -p123456 -s /tmp/mysql3308.sockchecking selinux status ... Info: selinux is disabled. CHECKING IF TOKUDB PLUGIN IS AVAILABLE FOR INSTALLATION&NBSP, ..... Info: ha_tokudb.so library for tokudb found at /usr/local/percona/lib/mysql /PLUGIN/HA_TOKUDB.SO.CHECKING LOCATION OF JEMALLOC LIBRARY&NBSP, ..... info: jemalloc library needed for tokudb found at /usr/local/percona/ lib/mysql/libjemalloc.so.1checking if percona server is running with Jemalloc enabled ... Info: percona server is running with jemalloc enabled. Checking transparent huge pages status on the system ... info: transparent huge pages are currently disabled&Nbsp;on the system. checking if thp-setting=never option is already set in config File ... Info: option thp-setting=never is not set in the config file. (needed only if thp is not disabled Permanently on the system) Checking tokudb engine plugin status ... Info: tokudb engine plugin is installed. adding thp-setting=never option into /etc/my3308.cnfinfo: successfully added thp-setting=never option into /etc/my3308.cnf
Second, add mysqld_safe start parameter preload-hotbackup to my.cnf configuration file
# bin/ps_tokudb_admin --defaults-file=/etc/my3308.cnf --enable-backup -uroot -p123456 -s /tmp/mysql3308.sockwarning: this script is deprecated and will be removed in 8.0. You can use ps-admin script which Has more functionality. Checking selinux status ... Info: selinux is disabled. Checking if percona server is running with jemalloc enabled ... Info: percona server is running with jemalloc enabled. Checking transparent huge pages status on the system ... Info: transparent huge pages are currently disabled on the system . checking if thp-setting=never option is already set in config File ... Info: option thp-setting=never is set&nBsp;in the config file. checking if preload-hotbackup option is already set in config File ... Info: option preload-hotbackup is not set in the config file. Checking tokudb engine plugin status ... Info: tokudb engine plugin is installed. Checking tokubackup plugin status ... Info: tokubackup plugin is not installed. adding preload-hotbackup option into /etc/my3308.cnfinfo: successfully added preload-hotbackup option into /etc/my3308.cnfplease restart mysql service and run this script again to finish installation!
Third, restart the MYSQLD service
/etc/init.d/mysql restart
Iv. Installing the Hot backup Tokubackup plugin tool plug-in
# bin/ps_tokudb_admin --defaults-file=/etc/my3308.cnf --enable-backup -uroot -p123456 -s /tmp/mysql3308.sockwarning: this script is deprecated and will be removed in 8.0. You can use ps-admin script which Has more functionality. Checking selinux status ... Info: selinux is disabled. Checking if percona server is running with jemalloc enabled ... Info: percona server is running with jemalloc enabled. Checking transparent huge pages status on the system ... Info: transparent huge pages are currently disabled on the system . checking if thp-setting=never option is already set in config File ... Info: option thp-setting=never is set&nBsp;in the config file. checking if preload-hotbackup option is already set in config File ... Info: option preload-hotbackup is set in the config file. Checking tokudb engine plugin status ... Info: tokudb engine plugin is installed. Checking tokubackup plugin status ... Info: tokubackup plugin is not installed. checking if percona server is running with libhotbackup.so preloaded ... Info: percona server is running with libhotbackup.so preloaded. Installing tokubackup plugin ... Info: successfully installed tokubackup plugin.
Five, start full-scale hot backup
Perform the following command to turn on hot backup:
MySQL [(None)]> set tokudb_backup_dir= '/data/tokudb_bak/'; Query OK, 0 rows affected (0.408 sec)
Note: Create an empty directory/data/tokudb_bak and change its properties to MySQL
Precautions:
1. Close asynchronous IO, otherwise the backup fails.
Innodb_use_native_aio = 0
2. Incremental backup is not supported
Vi. Recovery
Copy the backup file directly to your data directory and start the mysqld process.
Percona5.7 Tokubackup supports TOKUDB hot backup