{"id":11,"date":"2006-06-27T15:56:20","date_gmt":"2006-06-27T15:56:20","guid":{"rendered":"http:\/\/ramblingsofasysadmin.com\/blog\/?p=11"},"modified":"2006-06-27T15:56:20","modified_gmt":"2006-06-27T15:56:20","slug":"mysql-dump-and-restore","status":"publish","type":"post","link":"https:\/\/ramblingsofasysadmin.com\/?p=11","title":{"rendered":"mysql dump and restore."},"content":{"rendered":"<p>i&#8217;ve seen a tremendous amount of different syntaxes for the most simplest database dumps and restore.  why worry about the details?  this is how you perform a database backup:<br \/>\n<font face=\"courier\">$ mysqldump -u username -p databasename > filename.sql<\/font><br \/>\ntype your password at the prompt, wait a few seconds, and you now have a perfectly good .sql file that represents your database schema and all the data within.<br \/>\nto restore your database, use the following:<br \/>\n<font face=\"courier\">$ mysql -u username -p databasename < filename.sql<\/font><br \/>\nenter your password once again at the prompt.  this input assumes that you have a file named <font face=\"courier\">filename.sql<\/font> in the directory in which you are performing the backup.  you can reference the <font face=\"courier\">\/path\/to\/filename.sql<\/font> as well.<br \/>\nthat&#8217;s all there is to it.  if you need to change any data before the restore, simply edit the filename.sql with your favorite editor (but for your own sake, make sure it&#8217;s not that large!)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>i&#8217;ve seen a tremendous amount of different syntaxes for the most simplest database dumps and restore. why worry about the details? this is how you perform a database backup: $ mysqldump -u username -p databasename > filename.sql type your password at the prompt, wait a few seconds, and you now have a perfectly good .sql file that represents your database schema and all the data within. to restore your database, use the following: $ mysql <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"https:\/\/ramblingsofasysadmin.com\/?p=11\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11"}],"version-history":[{"count":0,"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=\/wp\/v2\/posts\/11\/revisions"}],"wp:attachment":[{"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ramblingsofasysadmin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}