{"id":205,"date":"2009-05-07T13:33:49","date_gmt":"2009-05-07T05:33:49","guid":{"rendered":"http:\/\/orczhou.com\/?p=205"},"modified":"2009-07-29T19:33:39","modified_gmt":"2009-07-29T11:33:39","slug":"mysql-backup-abc","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2009\/05\/mysql-backup-abc\/","title":{"rendered":"MySQL \u5907\u4efd\u57fa\u7840"},"content":{"rendered":"<p><a href=\"http:\/\/orczhou.com\/wp-content\/uploads\/2009\/04\/logo_mysql_sun_a.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-151 alignleft\" title=\"logo_mysql_sun_a\" src=\"http:\/\/orczhou.com\/wp-content\/uploads\/2009\/04\/logo_mysql_sun_a.gif\" alt=\"logo_mysql_sun_a\" width=\"114\" height=\"68\" \/><\/a><\/p>\n<p>\u4e00\u822c\u6765\u8bf4\uff0c\u4f60\u6709\u4e24\u79cd\u53ef\u4f9b\u9009\u62e9\u7684\u5907\u4efdMySQL\u7684\u65b9\u5f0f&#8212;-mysqldump \u6216\u8005mysqlhotcopy\u3002<\/p>\n<p>mysqldump\u53ef\u4ee5\u5907\u4efd\u5404\u79cd\u7c7b\u578b\u7684\u6570\u636e\u8868\uff0c\u4f46\u662fmysqlhotcopy<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/backup.html\" target=\"_blank\">\u53ea\u9002\u5408<\/a>\u5907\u4efdMyISAM\u548cISAM\u7684\u6570\u636e\u8868\u3002\u6240\u4ee5\u4f7f\u7528mysqlhotcopy\u4e4b\u524d\uff0c\u4f60\u5fc5\u987b\u786e\u8ba4\u4f60\u7684\u6570\u636e\u8868\u662f\u4e0d\u662f\u6709\u5176\u4ed6\u7684\u5b58\u50a8\u5f15\u64ce(storage engines)\u7684\u3002<!--more--><\/p>\n<p><span style=\"color: #0000ff;\"><strong>How To\uff1a<\/strong><\/span><\/p>\n<ol type=\"1\">\n<li><span style=\"color: #ff0000;\">mysqldump      -uroot -p***\u00a0DBNAME\u00a0| gzip -f&gt;\/backup\/dbname.&#8217;date      +%w&#8217;.dump.gz<\/span><\/li>\n<li><span style=\"color: #ff0000;\">mysqlhotcopy      DBNAME -u root -p *** \/backup<\/span><\/li>\n<\/ol>\n<p><span style=\"color: #0000ff;\"><strong>\u4e24\u8005\u901f\u5ea6\uff1a<\/strong><\/span>\u56e0\u4e3amysqlhotcopy\u4f1a\u76f4\u63a5\u62f7\u8d1d\u5b58\u50a8\u6570\u636e\u7684\u6587\u4ef6\uff0c\u6240\u4ee5\u5176\u901f\u5ea6\u662f\u4f9d\u8d56\u4e8e\u78c1\u76d8\u64cd\u4f5c\u7684\u901f\u5ea6\uff0c\u8f83\u4e4bmysqldump\u8981\u5feb\u4e9b\u3002\u4e0b\u9762\u662f\u4e24\u79cd\u65b9\u5f0f\u5907\u4efd\u540c\u4e00\u4e2a\u6570\u636e\u7684\u65f6\u5019\u7684\u65f6\u95f4\u6d88\u8017\u6bd4\u8f83\uff1a<\/p>\n<ol>\n<li>mysqldump \u00a0<span style=\"color: #008000;\">\u8017\u65f622\u520639\u79d2<\/span>\uff08gzip\u538b\u7f29\u540e\u6587\u4ef6\u5927\u5c0f\u4e3a747M.\uff09<\/li>\n<li>mysqlhotcopy \u00a0<span style=\"color: #008000;\">\u8017\u65f66\u520607\u79d2<\/span>\uff08tar gzip\u6253\u5305\u538b\u7f29\u540e\u6587\u4ef6\u5927\u5c0f\u4e3a1014M.\uff09<\/li>\n<\/ol>\n<p>\u53c2\u8003\uff1a<\/p>\n<ol>\n<li><a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/backup.html\" target=\"_blank\">http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/backup.html<\/a><a href=\"http:\/\/www.mysqlperformanceblog.com\/2009\/03\/03\/10-things-you-need-to-know-about-backup-solutions-for-mysql\/\"><\/a><\/li>\n<li><a href=\"http:\/\/www.mysqlperformanceblog.com\/2009\/03\/03\/10-things-you-need-to-know-about-backup-solutions-for-mysql\/\">ttp:\/\/www.mysqlperformanceblog.com\/2009\/03\/03\/10-things-you-need-to-know-about-backup-solutions-for-mysql\/<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u822c\u6765\u8bf4\uff0c\u4f60\u6709\u4e24\u79cd\u53ef\u4f9b\u9009\u62e9\u7684\u5907\u4efdMySQL\u7684\u65b9\u5f0f&#8212;-mysqldump \u6216\u8005mysqlhotcopy\u3002 mysqldump\u53ef\u4ee5\u5907\u4efd\u5404\u79cd\u7c7b\u578b\u7684\u6570\u636e\u8868\uff0c\u4f46\u662fmysqlhotcopy\u53ea\u9002\u5408\u5907\u4efdMyISAM\u548cISAM\u7684\u6570\u636e\u8868\u3002\u6240\u4ee5\u4f7f\u7528mysqlhotcopy\u4e4b\u524d\uff0c\u4f60\u5fc5\u987b\u786e\u8ba4\u4f60\u7684\u6570\u636e\u8868\u662f\u4e0d\u662f\u6709\u5176\u4ed6\u7684\u5b58\u50a8\u5f15\u64ce(storage engines)\u7684\u3002<\/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],"tags":[9,118,8,10],"class_list":["post-205","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-backup","tag-mysql","tag-mysqldump","tag-10"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/205","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=205"}],"version-history":[{"count":26,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/205\/revisions"}],"predecessor-version":[{"id":508,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/205\/revisions\/508"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}