mysql备份策略之我理解
Posted 瓶子倒了水未必流出来
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql备份策略之我理解相关的知识,希望对你有一定的参考价值。
备份策略,我个人感觉应该做到以下几点:
1、 备份的定位:是故障恢复用还是数据归档用;
2、 备份数据量:数据量有多少,需要的空间,备份时间,采用的备份方式;
3、 备份存储:规模化之后是要放在备份存储上的,一般不放在slave机器上,备份文件是放二到三份的;
4. 备份的有效性校验:是非常非常重要的思想。多个备份要抽样恢复;
5. 备份的恢复形式:
6、备份的安全保护:备份监控,备份完是否成功传到存储服务器上;
7、是否可用延迟库来防止主库误删除,而延迟时间又需要设置成多少?
!--5f39ae17-8c62-4a45-bc43-b32064c9388a:W3siYmxvY2tJZCI6Ijc1NjEtMTUzNjA1MjMyMzc3MCIsImJsb2NrVHlwZSI6InBhcmFncmFwaCIsInN0eWxlcyI6eyJhbGlnbiI6ImxlZnQiLCJpbmRlbnQiOjAsInRleHQtaW5kZW50IjowLCJsaW5lLWhlaWdodCI6MS43NSwiYmFjay1jb2xvciI6IiIsInBhZGRpbmciOiIifSwidHlwZSI6InBhcmFncmFwaCIsInJpY2hUZXh0Ijp7ImRhdGEiOlt7ImNoYXIiOiIxIn0seyJjaGFyIjoiLiJ9LHsiY2hhciI6IiAifSx7ImNoYXIiOiLlpIcifSx7ImNoYXIiOiLku70ifSx7ImNoYXIiOiLnmoQifSx7ImNoYXIiOiLlrpoifSx7ImNoYXIiOiLkvY0ifSx7ImNoYXIiOiLvvJoifV0sImlzUmljaFRleHQiOnRydWUsImtlZXBMaW5lQnJlYWsiOnRydWV9fSx7ImJsb2NrSWQiOiIyMjYxLTE1MzYwNTIzMjM3NzAiLCJibG9ja1R5cGUiOiJwYXJhZ3JhcGgiLCJzdHlsZXMiOnsiYWxpZ24iOiJsZWZ0IiwiaW5kZW50IjowLCJ0ZXh0LWluZGVudCI6MCwibGluZS1oZWlnaHQiOjEuNzUsImJhY2stY29sb3IiOiIiLCJwYWRka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aSHIn0seyJjaGFyIjoi5Lu9In0seyJjaGFyIjoi55qEIn0seyJjaGFyIjoi77yMIn1dLCJpc1JpY2hUZXh0Ijp0cnVlLCJrZWVwTGluZUJyZWFrIjp0cnVlfX0seyJibG9ja0lkIjoiODA0OS0xNTM2MDUyMzIzNzcxIiwiYmxvY2tUeXBlIjoicGFyYWdyYXBoIiwic3R5bGVzIjp7ImFsaWduIjoibGVmdCIsImluZGVudCI6MCwidGV4dC1pbmRlbnQiOjAsImxpbmUtaGVpZ2h0IjoxLjc1LCJiYWNrLWNvbG9yIjoiIiwicGFkZGluZyI6IiJ9LCJ0eXBlIjoicGFyYWdyYXBoIiwicmljaFRleHQiOnsiZGF0YSI6W3siY2hhciI6IjEifSx7ImNoYXIiOiIwIn0seyJjaGFyIjoiMCJ9LHsiY2hhciI6IuS4qiJ9LHsiY2hhciI6IuWkhyJ9LHsiY2hhciI6IuS7vSJ9XSwiaXNSaWNoVGV4dCI6dHJ1ZSwia2VlcExpbmVCcmVhayI6dHJ1ZX19XQ==-->以上是关于mysql备份策略之我理解的主要内容,如果未能解决你的问题,请参考以下文章
Mysql数据库备份策略:全备与增量备份
Linux12 -MYSQL数据库 -->17数据库的备份策略
mysql常用的备份命令与备份策略
MYSQL自动备份策略的方案
MySQL 备份数据恢复数据备份策略
MYSQL自动备份策略的选择与实践