作家
登录

GitHub的MySQL基础架构自动化测试

作者: 来源: 2017-10-10 09:08:57 阅读 我要评论

is complete. 

Hubot

  1. @tomkrouper: the locations table has been restored as locations_2017_07_01_16_11 in the restores database on db-mysql-0482 

数据被加载到非临盆情况的数据库,该数据库可供请求该次恢复的工程师拜访。

  1. .mysql restore 1699133 

我们保存数据的“备份”的最后一个办法是使悠揭捉?迟副本delayed replica。这与其说是备份,不如说是保护。对于每个临盆集群,我们有一个延迟 4 个小时复制的主机。如不雅运行了一个不该运行的请求,我们可以在 chatops 中运行 mysql panic 。这将导致我们所有的延迟副本急速停止复制。这也将给值班 DBA 发送消息。大年夜而我们可以使悠揭捉?迟副本来验证是否有问题,并快速进步到二进制日记的缺点产生之前的地位。然后,我们可以将此数据恢复到主办事器,大年夜而恢复数据到该时光点。

备份固然好,但如不雅产生了一些未知或未捕获的缺点破坏它们,它们就没有价值了。让脚本恢复备份的好处是它许可我们经由过程 cron 主动履行备份验证。我们为每个集群设置了一个专用的主机,用于运行最新备份的恢复。如许可以确保备份运行正常,并且我们可以或许大年夜备份中检索数据。

根据数据集大年夜小,我们天天运行几回恢复。恢复的办事器被参加到复制工作流,并经由过程复制保持数据更新。这测试不仅让我们获得了可恢复的备份,并且也让我们得以精确地肯定备份的时光点,并且可以大年夜该时光点进一步应用更改。如不雅恢复过程中出现问题,我们会收到通知。

我们还追踪恢复所需的时光,所以我们知道在紧急情况下建立新的副本或还原须要多长时光。

以下是由 Hubot 在我们的机械人聊天室中输出的主动恢复过程。

Hubot

  1. gh-mysql-backup-restore: db-mysql-0752: restore_log.id = 4447  
  2. gh-mysql-backup-restore: db-mysql-0752: Determining backup to restore for cluster 'prodcluster'.  
  3. gh-mysql-backup-restore: db-mysql-0752: Enabling maintenance mode  
  4. gh-mysql-backup-restore: db-mysql-0752: Setting orchestrator downtime  
  5. gh-mysql-backup-restore: db-mysql-0752: Disabling Puppet  
  6. gh-mysql-backup-restore: db-mysql-0752: Stopping MySQL  
  7. gh-mysql-backup-restore: db-mysql-0752: Removing MySQL files  
  8. gh-mysql-backup-restore: db-mysql-0752: Running gh-xtrabackup-restore  
  9. gh-mysql-backup-restore: db-mysql-0752: Restore file: xtrabackup-notify-2017-07-02_0000.xbstream  
  10. gh-mysql-backup-restore: db-mysql-0752: Running gh-xtrabackup-prepare  
  11. gh-mysql-backup-restore: db-mysql-0752: Starting MySQL  
  12. gh-mysql-backup-restore: db-mysql-0752: Update file ownership  
  13. gh-mysql-backup-restore: db-mysql-0752: Upgrade MySQL  
  14. gh-mysql-backup-restore: db-mysql-0752: Stopping MySQL  
  15. gh-mysql-backup-restore: db-mysql-0752: Starting MySQL  
  16. gh-mysql-backup-restore: db-mysql-0752: Backup Host: db-mysql-0034  
  17. gh-mysql-backup-restore: db-mysql-0752: Setting up replication  
  18. gh-mysql-backup-restore: db-mysql-0752: Starting replication  
  19. gh-mysql-backup-restore: db-mysql-0752: Replication catch-up  
  20. gh-mysql-backup-restore: db-mysql-0752: Restore complete (replication running)  
  21. gh-mysql-backup-restore: db-mysql-0752: Enabling Puppet  
  22. gh-mysql-backup-restore: db-mysql-0752: Disabling maintenance mode  

      推荐阅读

      百度长语音识别免费开放 大幅提升语音转写效率

    当语音输入不再受时光的限制,用户是否可以真正实现“动口不着手”?近日,百度AI开放平台向开辟者免费开放长语音辨认功能,经由过程SDK调用办事,可将长语音转换为文字。据懂得>>>详细阅读


    本文标题:GitHub的MySQL基础架构自动化测试

    地址:http://www.17bianji.com/lsqh/37750.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)