{"id":1029,"date":"2017-06-28T05:20:53","date_gmt":"2017-06-28T05:20:53","guid":{"rendered":"http:\/\/tw.newtonstudio.com\/?p=1029"},"modified":"2018-08-13T09:49:15","modified_gmt":"2018-08-13T01:49:15","slug":"%e7%b3%bb%e7%b5%b1%e7%b6%ad%e8%ad%b7%e5%b8%b8%e7%94%a8%e7%9a%84linux%e6%8c%87%e4%bb%a4","status":"publish","type":"post","link":"http:\/\/tw.newtonstudio.com\/?p=1029","title":{"rendered":"\u7cfb\u7d71\u7dad\u8b77\u5e38\u7528\u7684Linux\u6307\u4ee4"},"content":{"rendered":"<p><strong>\u8cc7\u6599\u5eab\u5099\u4efd\u532f\u51fa\u6210.sql.gz<\/strong><\/p>\n<pre><code class=\"linux\">mysqldump -uroot -p [databasename] | gzip &gt; [databasename].sql.gz\n<\/code><\/pre>\n<p>\u8cc7\u6599\u5eab\u532f\u5165 (Linux)\u00a0 (\u8981\u5148\u89e3\u58d3\u7e2e)<\/p>\n<pre><code class=\"linux\">mysql -u [username] -p [database_name] &lt; dumpfilename.sql\n<\/code><\/pre>\n<p>\u8cc7\u6599\u5eab\u532f\u5165 (Linux)\u00a0 (\u4e0d\u9700\u5148\u89e3\u58d3\u7e2e)<\/p>\n<pre><code class=\"linux\">gunzip &lt; [databasename].sql.gz | mysql -uroot -p [databasename]\n<\/code><\/pre>\n<p>\u8cc7\u6599\u5eab\u532f\u5165 (Mac)<\/p>\n<pre><code class=\"linux\">gunzip &lt; [databasename].sql.gz | \/usr\/local\/mysql\/bin\/mysql -uroot -p [databasename]\n<\/code><\/pre>\n<p>\u8cc7\u6599\u5eab\u532f\u5165 (Mac, XAMPP)<\/p>\n<pre><code class=\"linux\">gunzip &lt; [databasename].sql.gz | \/Applications\/XAMPP\/bin\/mysql -uroot -p [databasename]\n<\/code><\/pre>\n<p>\u5f9e\u672c\u6a5f\u4e0a\u50b3\u8cc7\u6599\u5230\u9060\u7aef\u4e3b\u6a5f<\/p>\n<pre><code class=\"linux\">scp -P [port] [yourfilename].tar.gz username@foo.com:\/path\/to\/\n<\/code><\/pre>\n<p><strong>\u5f9e\u9060\u7aef\u4e3b\u6a5f\u4e0b\u8f09\u8cc7\u6599\u5230\u672c\u6a5f<\/strong><\/p>\n<pre><code class=\"linux\">scp username@foo.com:\/path\/to\/[yourfilename].sql.gz \/yourlocal\/path\/to\/\n<\/code><\/pre>\n<p><strong>\u8cc7\u6599\u6253\u5305\u58d3\u7e2e<\/strong><\/p>\n<pre><code class=\"linux\">tar -zcvf [yourfilename].tar.gz [yourfoldername]\n<\/code><\/pre>\n<p><strong>\u8cc7\u6599\u89e3\u58d3\u7e2e<\/strong><\/p>\n<pre><code class=\"linux\">tar -zxvf [yourfilename].tar.gz\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8cc7\u6599\u5eab\u5099\u4efd\u532f\u51fa\u6210.sql.gz mysqldump -uroot -p [databasename] | gz [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[224],"tags":[],"class_list":["post-1029","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/posts\/1029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1029"}],"version-history":[{"count":9,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/posts\/1029\/revisions"}],"predecessor-version":[{"id":1072,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=\/wp\/v2\/posts\/1029\/revisions\/1072"}],"wp:attachment":[{"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1029"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tw.newtonstudio.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}