简体   繁体   English

Galera集群mysqldump技术

[英]Galera cluster mysqldump technique

I have the below setup for which I need to take a backup for. 我具有以下设置,需要对其进行备份。 - 5 nodes - running MariaDB - tables for databases use 'InnoDB' - using Galera for clustering - having Binary log, but I have cron job to flush (purging older than 10 or 30 days, each log file is about 1GB) - the directory '/var/lib/mysql' within container, I guess it is the data directory, is ~33G today with 30 mysql-bin.* files -5个节点-运行MariaDB-数据库表使用'InnoDB'-使用Galera进行群集-具有二进制日志,但是我有cron作业要刷新(清除10或30天以上,每个日志文件大约1GB)-目录容器中的“ / var / lib / mysql”,我想它是数据目录,今天是〜33G,带有30个mysql-bin。*文件

My questions: - Should I run 'mysqldump' on all 5 nodes, or is it OK to run on only one node? 我的问题:-我应该在所有5个节点上运行“ mysqldump”,还是可以仅在一个节点上运行? - How can I do incremental backup? -如何进行增量备份? Should I stop the cron job of purging binary log older than 10 or 30 days? 我应该停止清除10或30天以上的二进制日志的cron工作吗? - Any suggestion? -有什么建议吗?

Kindly help. 请帮助。

Thanks, Ashish 谢谢,Ashish

Galera mostly obviates the need for binlogs and dumps. Galera基本上消除了对binlog和转储的需求。 Your 5 nodes are 5 copies of the data. 您的5个节点是5个数据副本。 If any one of the nodes dies, it can (and will) be reconstructed from one of the surviving nodes. 如果任何一个节点死亡,则可以(并且将)从尚存的节点之一重建该节点。 (Cf "SST") (参见“ SST”)

You could take a node out of the cluster, dump it by any means, then put it back in. This would provide you with a recovery path is you lost all the nodes. 可以从群集中取出一个节点,以任何方式转储它,然后再放回去。这将为您提供丢失所有节点的恢复路径。

If all the nodes are in the same datacenter, you are vulnerable to natural disasters (wildfire, earthquake, etc). 如果所有节点都在同一数据中心中,则您很容易遭受自然灾害(野火,地震等)的伤害。

In writing out disaster recovery plans, you will discover the answer to "how many days of binlogs to keep". 在编写灾难恢复计划时,您将找到“保留多少二进制日志”的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM