Reputation: 105
I created a database backup on cPanel, before things went a bit wrong.
We managed to screw up a live WordPress site, and would like to restore the the DB as a different name for the development site before launching it back to the live site.
Is there a way to restore a cPanel MySQL backup to a different database name?
Thanks.
Upvotes: 0
Views: 1353
Reputation: 1440
Since you're saying "cPanel" so assuming that it's from cPanel's built-in backup utility so in .sql.gz format. You'll just need to gunzip (extract) that file, you'll find a .sql file inside of that. Simply create a new database, go into PHPMyAdmin, click on Import, select that .sql file (which you got after extraction), import it & you're done.
EDIT: Just to be on safe side, you can make sure that .sql file doesn't have something like "CREATE DATABASE". It shouldn't be there as per cPanel's standards but just be safe.
Upvotes: 1