{"id":365,"date":"2021-11-25T16:03:12","date_gmt":"2021-11-25T16:03:12","guid":{"rendered":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/?p=365"},"modified":"2021-11-25T16:03:12","modified_gmt":"2021-11-25T16:03:12","slug":"restoring-from-a-backup-file","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/25\/restoring-from-a-backup-file\/","title":{"rendered":"Restoring from a Backup File"},"content":{"rendered":"\n<p>To perform a restore from a file, call the mysql executable, passing it the file to restore from using the &lt; symbol. So, to recover an entire database that you dumped using the &#8211;all-databases option.<br>Restoring an entire set of databases:<\/p>\n\n\n\n<p><strong>mysql -u user -p password &lt; all_databases.sql<\/strong> or<br><strong>mysql -u user -p  &lt; all_databases.sql<\/strong><\/p>\n\n\n\n<p>Restoring the publications database:<\/p>\n\n\n\n<p><strong>mysql -u user -p password -D publications &lt; publications.sql<\/strong> or<br><strong>mysql -u user -p -D publications &lt; publications.sql<\/strong><\/p>\n\n\n\n<p>To restore a single table to a database, use a command such as that in next example where just the classics table is being restored to the publications database.<\/p>\n\n\n\n<p>Restoring the classics table to the publications database:<\/p>\n\n\n\n<p><strong>mysql -u user -p password -D publications &lt; classics.sql or<br>mysql -u user -p -D publications &lt; classics.sql<\/strong><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To perform a restore from a file, call the mysql executable, passing it the file to restore from using the &lt; symbol. So, to recover an entire database that you dumped using the &#8211;all-databases option.Restoring an entire set of databases: mysql -u user -p password &lt; all_databases.sql ormysql -u user -p &lt; all_databases.sql Restoring the &hellip; <a href=\"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/25\/restoring-from-a-backup-file\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Restoring from a Backup File<\/span> <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":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/365"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=365"}],"version-history":[{"count":1,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/365\/revisions"}],"predecessor-version":[{"id":366,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/365\/revisions\/366"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=365"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}