TokuDB 热备测试
发表于:2026-11-02 作者:千家信息网编辑
千家信息网最后更新 2026年11月02日,1、启动后尝试安装TokuDB插件[root@es3 mysql]# export PATH=$PATH:/usr/local/mysql/bin[root@es3 mysql]# ps_tokudb
千家信息网最后更新 2026年11月02日TokuDB 热备测试
1、启动后尝试安装TokuDB插件
[root@es3 mysql]# export PATH=$PATH:/usr/local/mysql/bin[root@es3 mysql]# ps_tokudb_admin -h227.0.0.1 --enableChecking SELinux status...INFO: SELinux is disabled.Checking location of jemalloc library ...INFO: Using jemalloc library from /usr/lib64/libjemalloc.so.1Checking transparent huge pages status on the system...INFO: Transparent huge pages are enabled (should be disabled).Checking if THP_SETTING variable is set to never or madvise in /etc/sysconfig/mysql...INFO: Variable THP_SETTING is not set to never or madvise in /etc/sysconfig/mysql.Checking if LD_PRELOAD variable is set for libjemalloc.so.1 in /etc/sysconfig/mysql...INFO: Variable LD_PRELOAD for libjemalloc.so.1 is set in /etc/sysconfig/mysql.Checking TokuDB engine plugin status...INFO: TokuDB engine plugin is not installed.Disabling transparent huge pages for the current session...INFO: Successfully disabled transparent huge pages for this session.Adding THP_SETTING=never variable into /etc/sysconfig/mysqlINFO: Successfully added THP_SETTING=never option into /etc/sysconfig/mysqlInstalling TokuDB engine...2019-08-27T08:51:36.877238Z 5 [ERROR] TokuDB is not initialized because jemalloc is not loaded2019-08-27T08:51:36.877264Z 5 [ERROR] Plugin 'TokuDB' init function returned error.2019-08-27T08:51:36.877279Z 5 [ERROR] Plugin 'TokuDB' registration as a STORAGE ENGINE failed.2019-08-27T08:51:36.877307Z 5 [Note] Shutting down plugin 'TokuDB'ERROR: Failed to install TokuDB engine plugin. Please check error log.
2、添加jemalloc 后
[root@es3 lib]# sh /usr/local/mysql/support-files/mysql.server start [root@es3 support-files]# ps_tokudb_admin -h227.0.0.1 --enableChecking 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 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 not installed.Adding thp-setting=never option into /etc/my.cnfINFO: Successfully added thp-setting=never option into /etc/my.cnfInstalling TokuDB engine...INFO: Successfully installed TokuDB engine plugin.
3、安装热备插件
[root@es3 support-files]# ps_tokudb_admin -h227.0.0.1 --enable-backupChecking 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.cnfINFO: Successfully added preload-hotbackup option into /etc/my.cnfPLEASE RESTART MYSQL SERVICE AND RUN THIS SCRIPT AGAIN TO FINISH INSTALLATION!
4、启动查看tokudb相关信息,尝试备份,并配置关闭异步IO
innodb_use_native_aio =0
5、重新运行一遍, --enable-backup(PLEASE RESTART MYSQL SERVICE AND RUN THIS SCRIPT AGAIN TO FINISH INSTALLATION!)
[root@es3 lib]# sh /usr/local/mysql/support-files/mysql.server restartShutting down MySQL (Percona Server)... SUCCESS! Starting MySQL (Percona Server).. SUCCESS! [root@es3 lib]# mkdir -p /data/backup/[root@es3 lib]# chown mysql.mysql -R /data/backup/[root@es3 lib]# mysql -h227.0.0.1Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 3Server version: 5.7.17-13 Percona Server (GPL), Release 13, Revision fd33d43Copyright (c) 2009-2016 Percona LLC and/or its affiliatesCopyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> set tokudb_backup_dir='/data/backup/';mysql> exitBye[root@es3 lib]# ps_tokudb_admin -h227.0.0.1 --enable-backupChecking 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 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.
6、执行备份,并观察
[root@es3 lib]# mysql -h227.0.0.1 Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 7Server version: 5.7.17-13 Percona Server (GPL), Release 13, Revision fd33d43Copyright (c) 2009-2016 Percona LLC and/or its affiliatesCopyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> set tokudb_backup_dir='/data/backup/';Query OK, 0 rows affected (13.16 sec)mysql> exitBye[root@es3 lib]# cd /data/backup/[root@es3 backup]# ll总用量 4drwxr-x--- 6 mysql mysql 4096 8月 27 17:56 mysql_data_dir[root@es3 backup]# cd mysql_data_dir/[root@es3 mysql_data_dir]# ll总用量 126896-rwxr-x--x 1 mysql mysql 56 8月 27 17:56 auto.cnf-rwxr-x--x 1 mysql mysql 1676 8月 27 17:56 ca-key.pem-rwxr-x--x 1 mysql mysql 1083 8月 27 17:56 ca.pem-rwxr-x--x 1 mysql mysql 1087 8月 27 17:56 client-cert.pem-rwxr-x--x 1 mysql mysql 1680 8月 27 17:56 client-key.pem-rwxr-x--x 1 mysql mysql 5 8月 27 17:56 es3.pid-rwxr-x--x 1 mysql mysql 292 8月 27 17:56 ib_buffer_pool-rwxr-x--x 1 mysql mysql 12582912 8月 27 17:57 ibdata1-rwxr-x--x 1 mysql mysql 50331648 8月 27 17:56 ib_logfile0-rwxr-x--x 1 mysql mysql 50331648 8月 27 17:57 ib_logfile1-rwxr-x--x 1 mysql mysql 12582912 8月 27 17:56 ibtmp1-rwxr-x--x 1 mysql mysql 2908 8月 27 17:56 log000000000003.tokulog29-rwxr-x--x 1 mysql mysql 23625 8月 27 17:56 mariadb.logdrwxr-x--x 2 mysql mysql 4096 8月 27 17:56 mysql-rwxr-x--x 1 mysql mysql 5 8月 27 17:56 mysql.sock.lockdrwxr-x--x 2 mysql mysql 8192 8月 27 17:56 performance_schema-rwxr-x--x 1 mysql mysql 1680 8月 27 17:56 private_key.pem-rwxr-x--x 1 mysql mysql 452 8月 27 17:56 public_key.pem-rwxr-x--x 1 mysql mysql 1087 8月 27 17:56 server-cert.pem-rwxr-x--x 1 mysql mysql 1676 8月 27 17:56 server-key.pemdrwxr-x--x 2 mysql mysql 8192 8月 27 17:56 sys-rwxr-x--x 1 mysql mysql 24576 8月 27 17:56 tc.logdrwxr-x--x 2 mysql mysql 60 8月 27 17:56 tktest-rwxr-x--x 1 mysql mysql 16384 8月 27 17:56 tokudb.directory-rwxr-x--x 1 mysql mysql 16384 8月 27 17:56 tokudb.environment-rwxr-x--x 1 mysql mysql 0 8月 27 17:56 __tokudb_lock_dont_delete_me_data-rwxr-x--x 1 mysql mysql 0 8月 27 17:56 __tokudb_lock_dont_delete_me_environment-rwxr-x--x 1 mysql mysql 0 8月 27 17:56 __tokudb_lock_dont_delete_me_logs-rwxr-x--x 1 mysql mysql 0 8月 27 17:56 __tokudb_lock_dont_delete_me_recovery-rwxr-x--x 1 mysql mysql 0 8月 27 17:56 __tokudb_lock_dont_delete_me_temp-rwxr-x--x 1 mysql mysql 16384 8月 27 17:56 tokudb.rollback-rwxr-x--x 1 mysql mysql 3932160 8月 27 17:56 xb_doublewrite
备份
插件
用量
尝试
信息
观察
运行
配置
测试
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网扶贫科技
美国互联网科技巨头监管
互联网 科技
深圳齐家互联网科技
壹账通互联网科技
多迪互联网科技有限公司
无锡溥仪互联网科技有限公司
银川新华互联网科技学校地址
宁波青枫互联网科技有限公司
北京华百购互联网科技有限公司
阿大互联网科技有限公司
哈尔滨屹滨互联网科技有限公司
亳州好赞互联网科技有限公司
互联网科技和法律行业
用友工业互联网科技发展
小米互联网科技园入驻
互联网金融运营模式中的金融科技
科技互联网公司两年变化
现代科技的标志之一的互联网
互联网 科技节活动 微视频大赛
科技平台互联网
互联网科技的发展
互联网科技公司发展
互联网科技有限公司 翻译
互联网科技博主是什么意思
本届互联网博览会上的黑科技
如何创新互联网科技
互联网科技的全部知识
广州富喜互联网络科技
河南商务圈互联网科技有限公司