• INNOBACKUPEX热备MYSQL数据


    http://www.databaseclub.com/2014/11/innobackupex/

    1)对MySQL进行全备份
    1.备份数据

    2.准备恢复数据

    3.将准备好的数据恢复到MySQL数据目录
    注意:MySQL的datadir必须为空,否则会出现错误

    4.修改拷贝回去的数据权限:

    5.重启MySQL服务器

    2)对MySQL进行增量备份
    1.对MySQLl进行全备份

    2.对MySQL进行增量备份

    3.准备恢复数据

    这个地方需要注意,在非最后一个增量时,一定要添加上–redo-only参数
    –redo-only
    This option should be used when preparing the base full backup and
    when merging all incrementals except the last one. This option is
    passed directly to xtrabackup’s –apply-log-only option. This forces
    xtrabackup to skip the “rollback” phase and do a “redo” only. This
    is necessary if the backup will have incremental changes applied to
    it later. See the xtrabackup documentation for details.
    4.将准备好的数据恢复到MySQL数据目录

    5.修改拷贝回去的数据权限

    6.重启MySQL服务

    通过上面的几个步骤,我们就可以进行MySQL的热备以及数据恢复了,当然了还会有很多常用的选项没有进行介绍,请大家自行参考Percona的官方文档



     
  • 相关阅读:
    「2019纪中集训Day20」解题报告
    PHP基础入门
    javascript
    正则表达式
    DOM 节点
    对象
    字符串
    函数
    for循环
    jQuery
  • 原文地址:https://www.cnblogs.com/zengkefu/p/5678292.html
Copyright © 2020-2023  润新知