千家信息网

Percona5.7 TokuBackup支持TokuDB热备份

发表于:2026-10-31 作者:千家信息网编辑
千家信息网最后更新 2026年10月31日,Percona5.7 TokuBackup支持TokuDB热备份一、安装tokudb引擎执行以下脚本,自动安装tokudb。# bin/ps-admin --defaults-file=/etc/my
千家信息网最后更新 2026年10月31日Percona5.7 TokuBackup支持TokuDB热备份

Percona5.7 TokuBackup支持TokuDB热备份


一、安装tokudb引擎

执行以下脚本,自动安装tokudb。

# 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 ...INFO: ha_tokudb.so library for TokuDB found at /usr/local/Percona/lib/mysql/plugin/ha_tokudb.so.Checking location of jemalloc library ...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 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



二、增加mysqld_safe启动参数preload-hotbackup至my.cnf配置文件里

# 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 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!



三、重启mysqld服务

/etc/init.d/mysql restart



四、安装热备份TokuBackup plugin工具插件

# 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 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.


五、开始全量热备份

执行下面的命令即可开启热备份:

MySQL [(none)]> set tokudb_backup_dir='/data/tokudb_bak/';Query OK, 0 rows affected (0.408 sec)

注:创建一个空目录/data/tokudb_bak,并将其属性改成mysql


注意事项:

1、关闭异步IO,否则备份失败。

innodb_use_native_aio = 0

2、不支持增量备份


六、恢复

直接拷贝备份文件至你的数据目录下,启动mysqld进程即可。



备份 支持 文件 事项 参数 命令 增量 属性 工具 引擎 拷贝 插件 数据 注意事项 目录 空目录 脚本 进程 面的 并将 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 南京欣网互联网络科技有限公司 广东猪兼强互联网科技有限公司 互联网科技公司的优势 涨乐互联网科技 北京互联网科技有限公司 大白互联网科技 人人互联网科技是培训 成都玖崟互联网科技有限公司乐商圈怎么样 互联网科技寓意 随着互联网科技发展 阿大互联网科技有限公司 注册互联网科技公司经营范围大全 速维有品互联网信息科技(苏州)有限公司 互联网科技研发水平 中国互联网公司排名锤子科技 锡山区互联网智能科技产品供应 信承诺互联网科技有限公司 唐山双旺合互联网科技产业园 互联网科技博主张洲 山东亿川互联网科技有限责任公司 为想互联网科技怎么样 河南真二互联网科技有限公司 平安科技 互联网 互联网与新科技 九亚互联网科技 安控科技rtu产品工业互联网 互联网科技创新服务 智腾互联网科技有限公司 云南省自由互联网科技有限公司 北京互联网科技类企业分布
0