{"id":607,"date":"2017-07-17T10:24:38","date_gmt":"2017-07-17T10:24:38","guid":{"rendered":"https:\/\/newdelhihosting.co.in\/blog\/?p=607"},"modified":"2024-10-22T10:44:49","modified_gmt":"2024-10-22T10:44:49","slug":"learn-how-to-backup-and-restore-mysql-database","status":"publish","type":"post","link":"https:\/\/www.newdelhihosting.co.in\/blog\/learn-how-to-backup-and-restore-mysql-database\/","title":{"rendered":"Learn How to Backup and Restore MySQL Database"},"content":{"rendered":"<p><strong>Backup Database in cPanel<\/strong><\/p>\n<p>The backup interface allows you to download and store your files,databases,forwarders and filters in a backup file.<\/p>\n<p>Step1:Login to your cPanel<\/p>\n<p>Step2:Under the <strong>files<\/strong> section, click on <strong>Backup<\/strong>.<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-614\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/FM-backup.png\" alt=\"\" width=\"500\" height=\"240\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/FM-backup.png 402w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/FM-backup-300x144.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/FM-backup-250x120.png 250w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/pre>\n<p>Step3: Now under the <strong>Download a MySQL Database Backup<\/strong> section, click on your database name, in this case <strong>user_wordpress<\/strong>.<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-615\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/Mysql-db.png\" alt=\"\" width=\"556\" height=\"218\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/Mysql-db.png 592w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/Mysql-db-300x118.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/Mysql-db-250x98.png 250w\" sizes=\"(max-width: 556px) 100vw, 556px\" \/><\/pre>\n<p>Step4:On your local machine, go to the folder your web-browser downloaded the database backup and you should now see the compressed <strong>.sql.gz<\/strong> file.<\/p>\n<p><!--more--><\/p>\n<p><strong>Restore Databse in cPanel:-<\/strong><\/p>\n<p>Step1:<a href=\"http:\/\/keeplearn.weebly.com\" target=\"_blank\" rel=\"noopener\">Login to your cPanel<\/a><\/p>\n<p>Step2:Under the <strong>files<\/strong> section, click on <strong>Backup<\/strong>.<\/p>\n<pre><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/FM-backup.png\" \/>\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Step3: Under <strong>Restore a MySQL Database,<\/strong> click on <strong>Choose File<\/strong>.<br \/>\nNext navigate in the file browser to your database backup you would like to restore, click on it, then click on <strong>Open<\/strong>.<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-618\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restore-choosefile.png\" alt=\"\" width=\"509\" height=\"243\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restore-choosefile.png 990w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restore-choosefile-300x143.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restore-choosefile-768x367.png 768w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restore-choosefile-250x119.png 250w\" sizes=\"(max-width: 509px) 100vw, 509px\" \/><\/pre>\n<p>Step4:You should now see your database backup that you&#8217;ve selected, go ahead and click <strong>Upload<\/strong>.<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-619\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/uploaddb.png\" alt=\"\" width=\"374\" height=\"297\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/uploaddb.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/uploaddb-250x198.png 250w\" sizes=\"(max-width: 374px) 100vw, 374px\" \/><\/pre>\n<p>Step5:Finally the full backup is restored, notice how it mentions our user_wordpress database already existed, and also it&#8217;s using the DROP TABLE IF EXISTS command.<\/p>\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-624\" src=\"https:\/\/newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restored.png\" alt=\"\" width=\"673\" height=\"471\" srcset=\"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restored.png 673w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restored-300x210.png 300w, https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/restored-250x175.png 250w\" sizes=\"(max-width: 673px) 100vw, 673px\" \/><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Backup Database in cPanel The backup interface allows you to download and store your files,databases,forwarders and filters in a backup file. Step1:Login to your cPanel Step2:Under the files section, click on Backup. Step3: Now under the Download a MySQL Database Backup section, click on your database name, in this case user_wordpress. Step4:On your local machine,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":631,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[22,15],"tags":[],"class_list":["post-607","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-db","category-cpanel"],"jetpack_featured_media_url":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-content\/uploads\/2017\/07\/fe-dbbakrestore.jpg","_links":{"self":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/607"}],"collection":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/comments?post=607"}],"version-history":[{"count":10,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/607\/revisions"}],"predecessor-version":[{"id":847,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/posts\/607\/revisions\/847"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media\/631"}],"wp:attachment":[{"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/media?parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/categories?post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newdelhihosting.co.in\/blog\/wp-json\/wp\/v2\/tags?post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}