2.\u589e\u52a0\u811a\u672c<\/strong><\/div>\n\u5b89\u88c5\u5b8c\u6210\u80fd\u770b\u5230\u7cfb\u7edf\u6709innobackupex \u547d\u4ee4\u5373\u53ef<\/p>\n
\u81ea\u52a8\u6bcf\u5929\u5168\u5907\u811a\u672c\uff1aall_backup.sh<\/p>\n
\r\n#!\/bin\/bash\r\nbasedir=\"\/data\/innobackupex\/$(date \"+%y%m%d\")\" ;\r\nsudo innobackupex --defaults-file=\/etc\/mysql\/my.cnf --user=root --password='xxxx' $basedir &>> \"\/data\/innobackupex\/$(date \"+%y%m%d\").log\"\r\n<\/pre>\n\u81ea\u52a8\u6bcf\u5c0f\u65f6\u589e\u5907\u811a\u672c\uff1aadd_backup.sh<\/p>\n
\r\n#!\/bin\/bash\r\nbasedir=\"\/data\/innobackupex\/$(date \"+%y%m%d\")\" ;\r\nadd_basedir=\"$basedir\/`ls $basedir|tail -n1`\";\r\nsudo innobackupex --defaults-file=\/etc\/mysql\/my.cnf --user=root --password='xxxxx' --incremental-basedir=\"$add_basedir\" --incremental $basedir &>> \"$basedir\/$(date \"+%y%m%d%H%M\").log\" ;\r\n<\/pre>\n3.\u4e3a\u811a\u672c\u521b\u5efa\u76f8\u5e94\u7684\u5b9a\u65f6\u4efb\u52a1<\/strong><\/div>\n\r\n5 0 * * * sudo \/bin\/bash \/data\/innobackupex\/all_backup.sh #\u6bcf\u5929\u96f6\u70b95\u5206\u5168\u5907\r\n55 * * * * sudo \/bin\/bash \/data\/innobackupex\/add_backup.sh #\u6bcf\u4e2a\u5c0f\u65f6\u768455\u5206\u8fdb\u884c\u4e00\u6b21\u589e\u5907\r\n<\/pre>\n\u540e\u7eed\u8fd8\u9700\u8981\u4e00\u4e9b\u81ea\u52a8\u6e05\u7406\u7a7a\u95f4\u7684\u811a\u672c<\/p>\n
4.\u6548\u679c\u5c55\u793a<\/strong><\/div>\n\r\nroot@xx:\/data\/innobackupex# pwd\r\n\/data\/innobackupex\r\nroot@xx:\/data\/innobackupex# ls\r\n181115 181115.log add_backup.sh all_backup.sh\r\n\r\nroot@xx:\/data\/innobackupex\/181115# pwd \r\n\/data\/innobackupex\/181115\r\nroot@xx:\/data\/innobackupex\/181115# ls\r\n1811151113.log 1811151255.log 1811151455.log 2018-11-15_11-08-39 2018-11-15_11-13-07 2018-11-15_12-55-02 2018-11-15_14-55-01\r\n1811151155.log 1811151355.log 2018-11-15_11-05-33 2018-11-15_11-11-14 2018-11-15_11-55-01 2018-11-15_13-55-01\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"wget https:\/\/www.percona.com\/downloads\/XtraBackup\/Perco […]<\/p>\n","protected":false},"author":63,"featured_media":145809,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-145808","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/145808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=145808"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/145808\/revisions"}],"predecessor-version":[{"id":145897,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/145808\/revisions\/145897"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/145809"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=145808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=145808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=145808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}