Hubot
- @tomkrouper: the locations table has been restored as locations_2017_07_01_16_11 in the restores database on db-mysql-0482
数据被加载到非临盆情况的数据库,该数据库可供请求该次恢复的工程师拜访。
- .mysql restore 1699133
我们保存数据的“备份”的最后一个办法是使悠揭捉?迟副本delayed replica。这与其说是备份,不如说是保护。对于每个临盆集群,我们有一个延迟 4 个小时复制的主机。如不雅运行了一个不该运行的请求,我们可以在 chatops 中运行 mysql panic 。这将导致我们所有的延迟副本急速停止复制。这也将给值班 DBA 发送消息。大年夜而我们可以使悠揭捉?迟副本来验证是否有问题,并快速进步到二进制日记的缺点产生之前的地位。然后,我们可以将此数据恢复到主办事器,大年夜而恢复数据到该时光点。
备份固然好,但如不雅产生了一些未知或未捕获的缺点破坏它们,它们就没有价值了。让脚本恢复备份的好处是它许可我们经由过程 cron 主动履行备份验证。我们为每个集群设置了一个专用的主机,用于运行最新备份的恢复。如许可以确保备份运行正常,并且我们可以或许大年夜备份中检索数据。
根据数据集大年夜小,我们天天运行几回恢复。恢复的办事器被参加到复制工作流,并经由过程复制保持数据更新。这测试不仅让我们获得了可恢复的备份,并且也让我们得以精确地肯定备份的时光点,并且可以大年夜该时光点进一步应用更改。如不雅恢复过程中出现问题,我们会收到通知。
我们还追踪恢复所需的时光,所以我们知道在紧急情况下建立新的副本或还原须要多长时光。
以下是由 Hubot 在我们的机械人聊天室中输出的主动恢复过程。
Hubot
- gh-mysql-backup-restore: db-mysql-0752: restore_log.id = 4447
- gh-mysql-backup-restore: db-mysql-0752: Determining backup to restore for cluster 'prodcluster'.
- gh-mysql-backup-restore: db-mysql-0752: Enabling maintenance mode
- gh-mysql-backup-restore: db-mysql-0752: Setting orchestrator downtime
- gh-mysql-backup-restore: db-mysql-0752: Disabling Puppet
- gh-mysql-backup-restore: db-mysql-0752: Stopping MySQL
- gh-mysql-backup-restore: db-mysql-0752: Removing MySQL files
- gh-mysql-backup-restore: db-mysql-0752: Running gh-xtrabackup-restore
- gh-mysql-backup-restore: db-mysql-0752: Restore file: xtrabackup-notify-2017-07-02_0000.xbstream
- gh-mysql-backup-restore: db-mysql-0752: Running gh-xtrabackup-prepare
- gh-mysql-backup-restore: db-mysql-0752: Starting MySQL
- gh-mysql-backup-restore: db-mysql-0752: Update file ownership
- gh-mysql-backup-restore: db-mysql-0752: Upgrade MySQL
- gh-mysql-backup-restore: db-mysql-0752: Stopping MySQL
- gh-mysql-backup-restore: db-mysql-0752: Starting MySQL
- gh-mysql-backup-restore: db-mysql-0752: Backup Host: db-mysql-0034
- gh-mysql-backup-restore: db-mysql-0752: Setting up replication
- gh-mysql-backup-restore: db-mysql-0752: Starting replication
- gh-mysql-backup-restore: db-mysql-0752: Replication catch-up
- gh-mysql-backup-restore: db-mysql-0752: Restore complete (replication running)
- gh-mysql-backup-restore: db-mysql-0752: Enabling Puppet
- gh-mysql-backup-restore: db-mysql-0752: Disabling maintenance mode
推荐阅读
当语音输入不再受时光的限制,用户是否可以真正实现“动口不着手”?近日,百度AI开放平台向开辟者免费开放长语音辨认功能,经由过程SDK调用办事,可将长语音转换为文字。据懂得>>>详细阅读
地址:http://www.17bianji.com/lsqh/37750.html
1/2 1