{"id":910,"date":"2009-10-19T11:44:35","date_gmt":"2009-10-19T03:44:35","guid":{"rendered":"http:\/\/orczhou.com\/?p=910"},"modified":"2009-10-19T11:44:35","modified_gmt":"2009-10-19T03:44:35","slug":"xtrabackup-2","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2009\/10\/xtrabackup-2\/","title":{"rendered":"Xtrabackup\u5907\u4efd\u548c\u6062\u590dMySQL(\u4e0b)"},"content":{"rendered":"<p style=\"text-indent:0\">\n<strong>\u4f5c\u8005\uff1a<\/strong>\u5468\u632f\u5174 <a href=\"http:\/\/www.flickr.com\/photos\/26825745@N06\/3933896112\/\" title=\"mail by orczhou, on Flickr\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm3.static.flickr.com\/2614\/3933896112_8ebfd42177_o.png\" width=\"163\" height=\"22\" alt=\"mail\" \/><\/a><br \/>\n<strong>\u6765\u81ea\uff1a<\/strong><a href=\"http:\/\/www.taobaodba.com\">supu@TaobaoDBA<\/a> 2009\u5e7410\u670813\u65e5\u661f\u671f\u4e8c<br \/>\n<strong>\u6458\u8981\uff1a<\/strong>\u5728<a href=\"http:\/\/orczhou.com\/index.php\/2009\/09\/xtrabackup-mysql-innodb\/\">\u4e0a\u7bc7<\/a>\u4e2d\u6211\u4eec\u4ecb\u7ecd\u4e86Xtrabackup\u7684\u7f16\u8bd1\u5b89\u88c5\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528innobackupex\u6765\u5907\u4efd\u548c\u6062\u590d\u6570\u636e\u5e93\u3002\u672c\u6587\u5c06\u7ee7\u7eed\u4ecb\u7ecdXtrabackup\u4e2d\u7684\u53e6\u4e00\u4e2a\u5de5\u5177xtrabackup\uff08\u4e8c\u8fdb\u5236\u811a\u672c\uff09\u3002innobackupex\u5bf9xtrabackup\u8fdb\u884c\u4e86\u5c01\u88c5\u53ef\u4ee5\u540c\u65f6\u5907\u4efdInnoDB\u548cMyISAM\u6570\u636e\u8868\uff0c\u5728\u5907\u4efdMyISAM\u8868\u65f6\u4f1a\u8fdb\u884c\u5168\u5c40\u9501\u8868\uff0c\u5982\u679c\u5355\u72ec\u4f7f\u7528xtrabackup\uff0c\u6211\u4eec\u4e0d\u4ec5\u53ef\u4ee5\u5b9e\u73b0\u771f\u6b63\u7684\u201c\u5728\u7ebf\u201d\u5907\u4efd\uff0c\u8fd8\u53ef\u4ee5\u8fdb\u884c\u589e\u91cf\u5907\u4efdInnoDB\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5355\u72ec\u4f7f\u7528xtrabackup\u6765\u5907\u4efd\u4f60\u7684InnoDB\u6570\u636e\u3002\uff08\u672c\u6587PDF\u7248\u672c\uff1a<a href=\"http:\/\/orczhou.com\/wp-content\/uploads\/2009\/10\/xtrabackupe4bb8be7bb8d-1.pdf\">\u4e0a\u7bc7<\/a> <a href=\"http:\/\/orczhou.com\/wp-content\/uploads\/2009\/10\/xtrabackupe4bb8be7bb8d-2.pdf\">\u4e0b\u7bc7<\/a>\uff09\n<\/p>\n<p><!--more--><\/p>\n<p style=\"text-indent:0\">\n+++++++++++++++++++++++++++++++++<br \/>\n<strong>\u6b63\u6587\uff1a<\/strong><br \/>\n+++++++++++++++++++++++++++++++++\n<\/p>\n<p style=\"text-indent:0\"><font size=4><b>\u4e00\u3001\t\u4f7f\u7528\u8bf4\u660e<\/b><\/font><\/p>\n<p>\u672c\u6587\u6d4b\u8bd5\u73af\u5883\u540c<a href=\"http:\/\/orczhou.com\/index.php\/2009\/09\/xtrabackup-mysql-innodb\/\">\u4e0a\u7bc7<\/a>\u3002<\/p>\n<p><font size=3>1.\t\u5907\u4efd<\/font><\/p>\n<p>InnoDB\u914d\u7f6e\u8bf4\u660e\uff1a<\/p>\n<blockquote><p>\ninnodb_data_home_dir = .\/<br \/>\ninnodb_data_file_path = ibdata1:50M:autoextend<br \/>\ninnodb_log_group_home_dir = .\/<br \/>\ninnodb_log_files_in_group = 4<br \/>\ninnodb_log_file_size = 104857600\n<\/p><\/blockquote>\n<p>\u5907\u4efd\u547d\u4ee4\uff1a<\/p>\n<blockquote><p>\n$xtrabackup &#45;&#45;defaults-file=\/etc\/my.cnf &#45;&#45;backup &#45;&#45;target-dir=\/u01\/xtrabackup\/1\/<br \/>\n\u2026\u2026<br \/>\n$cd \/u01\/xtrabackup\/1\/ &#038;&#038; ls<br \/>\nibdata1  test  xtrabackup_checkpoints  xtrabackup_logfile\n<\/p><\/blockquote>\n<p><font size=3>2.\t\u6062\u590d<\/font><\/p>\n<p>\u9700\u8981\u6267\u884c\u4e24\u6b21xtrabackup &#45;&#45;prepare<\/p>\n<blockquote><p>\n$xtrabackup &#45;&#45;defaults-file=\/etc\/my.cnf &#45;&#45;prepare &#45;&#45;target-dir=\/u01\/xtrabackup\/1\/<br \/>\n\u2026\u2026<br \/>\n$xtrabackup &#45;&#45;defaults-file=\/etc\/my.cnf &#45;&#45;prepare &#45;&#45;target-dir=\/u01\/xtrabackup\/1\/<br \/>\n\u2026\u2026<br \/>\n$cd \/u01\/xtrabackup\/1\/ &#038;&#038; ls<br \/>\nibdata1  ib_logfile0  ib_logfile1  ib_logfile2  ib_logfile3  test  xtrabackup_checkpoints  xtrabackup_logfile\n<\/p><\/blockquote>\n<p>\u8fd9\u65f6\u5019\uff0cInnoDB\u7684\u5168\u90e8\u6570\u636e\u6587\u4ef6\u5c31\u5df2\u7ecf\u6062\u590d\u4e86\u3002\u5c06\u8fd9\u4e9b\u6570\u636e\u6587\u4ef6\uff0c\u62f7\u8d1d\u56de\u4f60\u7684MySQL\u6570\u636e\u6587\u4ef6\u7684\u4f4d\u7f6e\u5c31\u53ef\u4ee5\u4e86\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cxtrabackup\u53ea\u5907\u4efd\u6570\u636e\u6587\u4ef6\uff0c\u5e76\u4e0d\u5907\u4efd\u6570\u636e\u8868\u7ed3\u6784\uff08.frm\uff09\uff0c\u6240\u4ee5\u4f7f\u7528xtrabackup\u6062\u590d\u7684\u65f6\u5019\uff0c\u4f60\u5fc5\u987b\u6709\u5bf9\u5e94\u8868\u7ed3\u6784\u6587\u4ef6\uff08.frm\uff09\u3002<\/p>\n<p style=\"text-indent:0\"><font size=4><b>\u4e8c\u3001\t\u589e\u91cf\u5907\u4efd<\/b><\/font><\/p>\n<p>\u5bf9\u6bd4innobackupex\u548cxtrabackup\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0cinnobackupex\u64cd\u4f5c\u8d77\u6765\u66f4\u65b9\u4fbf\uff0c\u4f46\u662finnobackupex\u4f1a\u6709\u77ed\u6682\u7684\u9501\u8868\uff08\u65f6\u95f4\u4f9d\u8d56\u4e8eMyISAM\u5927\u5c0f\uff09\u3002xtrabackup\u5907\u4efd\u8fd8\u6709\u53e6\u4e00\u4e2a\u91cd\u8981\u7279\u6027\uff1a\u589e\u91cf\u5907\u4efd\u3002\uff08\u672a\u6765\u7684\u7248\u672cinnobackupex\u4e5f\u53ef\u80fd\u589e\u957f\u8be5\u529f\u80fd\uff09<\/p>\n<p><font size=3>1.\t\u5168\u91cf\u5907\u4efd<\/font><\/p>\n<blockquote><p>\n$xtrabackup &#45;&#45;defaults-file=\/etc\/my.cnf &#45;&#45;backup &#45;&#45;target-dir=\/u01\/xtrabackup\/2\/<br \/>\n\u2026\u2026<br \/>\n$ls \/u01\/xtrabackup\/2\/<br \/>\nibdata1  test  xtrabackup_checkpoints  xtrabackup_logfile\n<\/p><\/blockquote>\n<p><font size=3>2.\t\u589e\u91cf\u5907\u4efd<\/font><\/p>\n<blockquote><p>\n$xtrabackup &#45;&#45;defaults-file=\/etc\/my.cnf &#45;&#45;backup &#45;&#45;target-dir=\/u01\/xtrabackup\/2.1\/  &#45;&#45;incremental-basedir=\/u01\/xtrabackup\/2\/<br \/>\n\u2026\u2026<br \/>\n$ls \/u01\/xtrabackup\/2.1\/<br \/>\nibdata1.delta  test  xtrabackup_checkpoints  xtrabackup_logfile\n<\/p><\/blockquote>\n<p>\u5728\u589e\u91cf\u5907\u4efd\u7684\u76ee\u5f55\u4e0b\uff0c\u6570\u636e\u6587\u4ef6\u90fd\u662f\u4ee5.delta\u7ed3\u5c3e\u7684\u3002\u589e\u91cf\u5907\u4efd\u53ea\u5907\u4efd\u4e0a\u4e00\u6b21\u5168\u91cf\u5907\u4efd\u4e4b\u540e\u88ab\u4fee\u6539\u8fc7\u7684page\uff0c\u6240\u4ee5\u589e\u91cf\u5907\u4efd\u4e00\u822c\u53ea\u6682\u7528\u8f83\u5c11\u7684\u7a7a\u95f4\u3002<\/p>\n<blockquote><p>\n$cd \/u01\/xtrabackup\/ &#038;&#038; du &#45;&#45;max-depth=1 -h<br \/>\n428K    .\/2.1<br \/>\n935M    .\/2\n<\/p><\/blockquote>\n<p><font size=3>3.\t\u589e\u91cf\u5907\u4efd\u6062\u590d<\/font><\/p>\n<p>\u6211\u4eec\u9700\u8981\u5206\u522b\u5bf9\u5168\u91cf\u3001\u589e\u91cf\u5907\u4efd\u5404\u505a\u4e00\u6b21prepare\u64cd\u4f5c\u3002<\/p>\n<blockquote><p>\n$xtrabackup &#45;&#45;defaults-file=\/etc\/my.cnf &#45;&#45;prepare &#45;&#45;target-dir=\/u01\/xtrabackup\/2\/<br \/>\n\u2026\u2026<br \/>\n$xtrabackup &#45;&#45;prepare &#45;&#45;target-dir=\/u01\/xtrabackup\/2\/ &#45;&#45;incremental-dir=\/u01\/xtrabackup\/2.1\/<br \/>\n\u2026\u2026<br \/>\n$xtrabackup &#45;&#45;prepare &#45;&#45;target-dir=\/u01\/xtrabackup\/2\/\t#\u8fd9\u4e00\u6b65\u4e0d\u662f\u5fc5\u987b\u7684\n<\/p><\/blockquote>\n<p>\u8fd9\u6837\uff0c\/u01\/xtrabackup\/2\/\u4e0b\u7684\u6570\u636e\u6587\u4ef6\u5c31\u53ef\u4ee5\u76f4\u63a5\u653e\u5230\u4f60\u7684MySQL\u6570\u636e\u76ee\u5f55\u4e0b\uff0c\u6062\u590d\u6570\u636e\u4e86\u3002<\/p>\n<p>\u518d\u6b21\u63d0\u9192\uff0cxtrabackup\u53ea\u5907\u4efdInnoDB\u6570\u636e\u6587\u4ef6\uff0c\u8868\u7ed3\u6784\u662f\u4e0d\u5907\u4efd\u7684\uff0c\u6240\u4ee5\u6062\u590d\u7684\u65f6\u5019\uff0c\u4f60\u5fc5\u987b\u6709\u5bf9\u5e94\u8868\u7ed3\u6784\u6587\u4ef6(.frm)\u3002<\/p>\n<p>\u53c2\u8003\u6587\u732e<br \/>\n[1].\thttp:\/\/www.percona.com\/docs\/wiki\/percona-xtrabackup:start<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u5468\u632f\u5174 \u6765\u81ea\uff1asupu@TaobaoDBA 2009\u5e7410\u670813\u65e5\u661f\u671f\u4e8c \u6458\u8981\uff1a\u5728\u4e0a\u7bc7\u4e2d\u6211\u4eec\u4ecb\u7ecd\u4e86Xtrabackup\u7684\u7f16\u8bd1\u5b89\u88c5\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528innobackupex\u6765\u5907\u4efd\u548c\u6062\u590d\u6570\u636e\u5e93\u3002\u672c\u6587\u5c06\u7ee7\u7eed\u4ecb\u7ecdXtrabackup\u4e2d\u7684\u53e6\u4e00\u4e2a\u5de5\u5177xtrabackup\uff08\u4e8c\u8fdb\u5236\u811a\u672c\uff09\u3002innobackupex\u5bf9xtrabackup\u8fdb\u884c\u4e86\u5c01\u88c5\u53ef\u4ee5\u540c\u65f6\u5907\u4efdInnoDB\u548cMyISAM\u6570\u636e\u8868\uff0c\u5728\u5907\u4efdMyISAM\u8868\u65f6\u4f1a\u8fdb\u884c\u5168\u5c40\u9501\u8868\uff0c\u5982\u679c\u5355\u72ec\u4f7f\u7528xtrabackup\uff0c\u6211\u4eec\u4e0d\u4ec5\u53ef\u4ee5\u5b9e\u73b0\u771f\u6b63\u7684\u201c\u5728\u7ebf\u201d\u5907\u4efd\uff0c\u8fd8\u53ef\u4ee5\u8fdb\u884c\u589e\u91cf\u5907\u4efdInnoDB\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5355\u72ec\u4f7f\u7528xtrabackup\u6765\u5907\u4efd\u4f60\u7684InnoDB\u6570\u636e\u3002\uff08\u672c\u6587PDF\u7248\u672c\uff1a\u4e0a\u7bc7 \u4e0b\u7bc7\uff09<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","inline_featured_image":false,"_tocer_settings":[],"footnotes":""},"categories":[6,4],"tags":[29],"class_list":["post-910","post","type-post","status-publish","format-standard","hentry","category-mysql","category-code-detail","tag-xtrabackup"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=910"}],"version-history":[{"count":14,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/910\/revisions"}],"predecessor-version":[{"id":934,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/910\/revisions\/934"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}