mysql 5.7 tokudb_Percona5.7 TokuBackup支持TokuDB热备份

Percona5.7 TokuBackup支持TokuDB热备份

发布时间:2020-07-13 05:43:57

来源:51CTO

阅读:4260

作者:hcymysql

Percona5.7 TokuBackup支持TokuDB热备份

一、安装tokudb引擎

执行以下脚本,自动安装tokudb。# bin/ps-admin --defaults-file=/etc/my3308.cnf --enable -uroot -p123456 -S /tmp/mysql3308.sock

Checking 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.1

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

Adding thp-setting=never option into /etc/my3308.cnf

INFO: 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.sock

WARNING: 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.cnf

INFO: Successfully added preload-hotbackup option into /etc/my3308.cnf

PLEASE 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.sock

WARNING: 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进程即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。 经导师精心指导并认可、获 98 分的毕业设计项目!【项目资源】:微信小程序。【项目说明】:聚焦计算机相关专业毕设及实战操练,可作课程设计与期末大作业,含全部源码,能直用于毕设,经严格调试,运行有保障!【项目服务】:有任何使用上的问题,欢迎随时与博主沟通,博主会及时解答。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值