{"id":69,"date":"2011-01-26T17:49:13","date_gmt":"2011-01-26T14:49:13","guid":{"rendered":"http:\/\/meekconsulting.com\/?p=69"},"modified":"2011-01-26T17:51:02","modified_gmt":"2011-01-26T14:51:02","slug":"extract-and-reload-mysql-database-gzip-on-the-fly","status":"publish","type":"post","link":"https:\/\/meekconsulting.com\/?p=69","title":{"rendered":"extract and reload mysql database &#8212; GZIP on the fly."},"content":{"rendered":"<p>To dump a mysql database use the mysqldump command and pipe it to gzip on the fly so the resulting backup file is compressed with this command:<\/p>\n<blockquote><p>mysqldump -u[uname] -p [dbname] | gzip \u2013 > backupfilename.dmp.gz<\/p><\/blockquote>\n<p>To restore this on another machine you need to create the databse using mysqladmin<\/p>\n<blockquote><p>\nmysqladmin -u[uname] -p create schemaname<\/p><\/blockquote>\n<p>Then load the data with <\/p>\n<blockquote><p>gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>To dump a mysql database use the mysqldump command and pipe it to gzip on the fly so the resulting backup file is compressed with this command: mysqldump -u[uname] -p [dbname] | gzip \u2013 > backupfilename.dmp.gz To restore this on &hellip; <a href=\"https:\/\/meekconsulting.com\/?p=69\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/69"}],"collection":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69"}],"version-history":[{"count":3,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meekconsulting.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}