Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

InnoDB和TukoDB同时存在就无法备份 #6

Open
lijujntao120 opened this issue May 14, 2020 · 9 comments
Open

InnoDB和TukoDB同时存在就无法备份 #6

lijujntao120 opened this issue May 14, 2020 · 9 comments

Comments

@lijujntao120
Copy link

image
我们线上环境是两个引擎同时存在,请问该如何备份,谢谢,我主要是打算用来重新做主从,但是线上环境是不能锁表的.

@BohuTANG
Copy link
Collaborator

tokudb-xtrabackup 是可以同时备份两种引擎表的,如果使用的是这个版本,Warning可以忽略。

@lijujntao120
Copy link
Author

需要加参数吗??能否发一条建议的备份命令实例,我备份完毕后,重做主从,谢谢!

@BohuTANG
Copy link
Collaborator

不需要任何参数,自动备份。

@lijujntao120
Copy link
Author

my.conf 里面以下两个参数 :
datadir = /var/lib/mysql
tokudb_data_dir=/data/var/tokudb_data

使用默认参数 ,和加子些参数备份都感觉不正常,备份出来的文件很小.
3.0G 0515_mysql/
但原来的库文件大小
121G tokudb_data
11G mysql
麻烦看一下,谢谢!
备份命令:
1./usr/local/xtrabackup_dir/bin/xtrabackup --datadir=/var/lib/mysql --host=127.0.0.1 --user=root --password=passwd --no-timestamp --slave-info --ftwrl-wait-query-type=all --parallel=5 --compress --compress-threads=3 --backup --target-dir=/data/backup/0515_mysql

2./usr/local/xtrabackup_dir/bin/innobackupex --defaults-file=/etc/mysql/my.cnf --user=root --password='passwd /data/backup/0514_mysqlbk

3./usr/local/xtrabackup_dir/bin/xtrabackup --datadir=/var/lib/mysql --tokudb_data_dir=/data/var/tokudb_data --host=127.0.0.1 --user=root --password=passwd --no-timestamp --slave-info --ftwrl-wait-query-type=all --parallel=5 --compress --compress-threads=3 --backup --target-dir=/data/backup/0515_mysql

@BohuTANG
Copy link
Collaborator

xtrabackup 是哪里的版本?

@lijujntao120
Copy link
Author

/usr/local/xtrabackup_dir/bin/xtrabackup version 2.4.20 based on MySQL server 5.7.26 Linux (x86_64) (XeLabs build revision id: )

@lijujntao120
Copy link
Author

我自己用的mysql是5.6的

@BohuTANG
Copy link
Collaborator

我们的备份命令可以参考:
https://github.com/radondb/xenon/blob/master/src/mysqld/backup.go#L102

从备份恢复命令参考:
https://github.com/radondb/xenon/blob/master/src/mysqld/backup.go#L207

如果你想使用这种机制搭建一个从库,请参考:
https://github.com/radondb/xenon/blob/master/src/cli/cmd/mysql.go#L272

@lijujntao120
Copy link
Author

这我也看不懂啊.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants