Getting TokuBackup to Work

  1. We downloaded and successfully installed Percona-Server-tokudb-56-5.6.28-rel76.1.el6.x86_64.rpm and the other associated packages, which is supposed to include TokuBackup.

-rw-r–r-- 1 root root 125880320 Jan 12 03:41 Percona-Server-5.6.28-76.1-r5759e76-el6-x86_64-bundle.tar
-rw-rw-r-- 1 root root 71754356 Jan 8 14:41 Percona-Server-56-debuginfo-5.6.28-rel76.1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 6776280 Jan 8 14:41 Percona-Server-client-56-5.6.28-rel76.1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 1078544 Jan 8 14:41 Percona-Server-devel-56-5.6.28-rel76.1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 20550228 Jan 8 14:41 Percona-Server-server-56-5.6.28-rel76.1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 743104 Jan 8 14:41 Percona-Server-shared-56-5.6.28-rel76.1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 23329528 Jan 8 14:41 Percona-Server-test-56-5.6.28-rel76.1.el6.x86_64.rpm
-rw-rw-r-- 1 root root 1640196 Jan 8 14:41 Percona-Server-tokudb-56-5.6.28-rel76.1.el6.x86_64.rpm

  1. We successfully ran ps_tokudb_admin…

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 in the config file.

Checking TokuDB engine plugin status…
INFO: TokuDB engine plugin is installed.

  1. We checked for the existence and permissions on /usr/lib64/mysql/plugin/tokudb_backup.so

-rwxr-xr-x 1 root root 21128 Jan 8 14:40 /usr/lib64/mysql/plugin/tokudb_backup.so

  1. We tried to install the plugin… no joy…

install plugin tokudb_backup soname ‘tokudb_backup.so’;

ERROR 1126 (HY000): Can’t open shared library ‘/usr/lib64/mysql/plugin/tokudb_backup.so’ (errno: 2 /usr/lib64/mysql/plugin/tokudb_backup.so: undefined symbol: tokubackup_version_string)

  1. Plugin does not show as installed or active…

±------------------------------±--------------+
| plugin_name | plugin_status |
±------------------------------±--------------+
| TokuDB | ACTIVE |
| TokuDB_file_map | ACTIVE |
| TokuDB_fractal_tree_info | ACTIVE |
| TokuDB_fractal_tree_block_map | ACTIVE |
| TokuDB_trx | ACTIVE |
| TokuDB_locks | ACTIVE |
| TokuDB_lock_waits | ACTIVE |
±------------------------------±--------------+

What am I doing wrong?

Just a thought… do you have this line in your my.cnf file? Yes I know you say ps_tokudb_admin ran fine but did it, or did you not run with --enable-backup?

[mysqld_safe]
preload-hotbackup

If you don’t that is exactly the behaviour you will see.

Look in the error log… right after the entry on db restart where plugins are isted and before innodb entries you might see something like this… if this is not there.

2016-01-19 14:31:48 30948 [Note] Plugin ‘FEDERATED’ is disabled.
2016-01-19 14:31:48 30948 [ERROR] Can’t open shared library ‘/usr/lib64/mysql/plugin/tokudb_backup.so’ (errno: 2 /usr/lib64/mysql/plugin/tokudb_backup.so: undefined symbol: tokubackup_version_string)
2016-01-19 14:31:48 30948 [Warning] Couldn’t load plugin named ‘tokudb_backup’ with soname ‘tokudb_backup.so’.

If that is the entry then add or uncomment that line (from mysqld_safe section) and restart the db service.

Dom

Thanks for your comments. Yes, I did use the --enable-backup option to ps_tokudb_admin, but I do not have the preload-hotbackup in my.cnf. I thought I read somewhere that the line is no longer necessary. I’ll try that change after production hours tonight.

Just run exactly the same set of software you had on a CentOS 6.7 host just to be sure…

The output I have is

"…
[root@localhost ~]# ps_tokudb_admin --enable --enable-backup
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 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/my.cnf
INFO: Successfully added preload-hotbackup option into /etc/my.cnf
PLEASE RESTART MYSQL SERVICE AND RUN THIS SCRIPT AGAIN TO FINISH INSTALLATION!

[root@localhost ~]# service mysql restart
Shutting down MySQL (Percona Server)… [ OK ]
Starting MySQL (Percona Server)… [ OK ]
[root@localhost ~]# ps_tokudb_admin --enable --enable-backup
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 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 installed.

Checking if Percona Server is running with libHotBackup.so preloaded…
INFO: Percona Server is running with libHotBackup.so preloaded.

…"

The SECOND run of the ps_tokudb_admin script (you need to run it twice and restart the service between) you should see these entries.

Checking TokuBackup plugin status…
INFO: TokuBackup plugin is installed.

Checking if Percona Server is running with libHotBackup.so preloaded…
INFO: Percona Server is running with libHotBackup.so preloaded.

If you do not then that will be an indication of the problem.
And if you DO NOT have the preload in the my.cnf (see last entry of the first run) the plugin doesn’t load either.

Regards,
Dom
I don’t work for Percona just a simple DBA

Your first instinct was the correct one. Last night all I did was add the preload-hotbackup directive to my.cnf, restart mysql, and now TokuBackup works! Got my first backup last night, which was awesome. Thanks for the tip!