网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Percona5.7TokuBackup支持TokuDB热备份

Percona5.7 TokuBackup支持TokuDB热备份

辽中ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为成都创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:028-86922220(备注:SSL证书合作)期待与您的合作!

一、安装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进程即可。


当前题目:Percona5.7TokuBackup支持TokuDB热备份
网页URL:http://bjjierui.cn/article/ghdjih.html

其他资讯