Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 16, 2012, 07:31:01 PM

Pages: [1]   Go Down
  Print  
Author Topic: Restore a single database, not complete system  (Read 1234 times)
Kerry
Pong! (the videogame) Master
*****
Offline Offline

Posts: 20


« on: September 26, 2011, 05:59:39 AM »

I need guidance in restoring a single database rather than a complete restore of databases. I have multiple databases, but only need to restore one of the databases. When backing up databases, the CPanel shows a choice of databases to backup. When trying to restore a database, I do not get the option to select which database I want to to restore. I'm concerned that if I do  not specify the specific database I could corrupt my other databases.
Logged
KrisA
Customer Service Supervisor
Support Supervisor
Spacescooter Operator
*****
Offline Offline

Posts: 34


+-. Learning is a treasure .-+


« Reply #1 on: September 27, 2011, 09:20:10 PM »

Kerry, so at this time you have .sql backup file on your hand?

If so, open phpMyAdmin in your cPanel. Select the database you want to import the backup in. Go to the SQL tab.

Look at the bottom for "Or location of the textfile" and browse to the dumpfile. Doubleclick on it so that the fileadress appears in the textbox. Then hit the "Go" button.

All SQL-statement will be executed and you will get a notification after the file is processed.
Logged

Kris Asvapatipatt
Customer Service Supervisor
Lunarpages Internet Solutions

Web: http://www.lunarpages.com/
Community: http://www.lunarforums.com/
Wiki: http://wiki.lunarpages.com
Facebook: http://www.facebook.com/lunarpages
Twitter: http://twitter.com/#!/lunarpages
maxepotter
Space Explorer
***
Offline Offline

Posts: 9


« Reply #2 on: February 13, 2012, 01:16:54 AM »

MySQL dump is an effective tool to backup MySQL database. It creates a .SQL file with DROP table, CREATE table and INSERT into SQL statements of the source database. Using mysqldump, you can backup a local database and restore it on a remote database at the same time, using a single command. In this article, let us review several practical examples on how to use mysqldump to backup and restore.
Logged

MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5191



« Reply #3 on: February 13, 2012, 07:17:00 AM »

Kerry, do you have access to the individual .sql files produced by the backup? Is there an .sql file for each database? If so, you can do as suggested and use phpMyAdmin to "import" just that one database. Check to see if the .sql file first removes the old tables (does a DROP and CREATE) or does an EMPTY first, or assumes that the tables are empty and/or removed, before trying to restore. What you will need to do to manually prepare for restore depends on what state the backup assumes the database is in.

If all the databases are smashed into one .sql file, you can download this file to your PC and manually edit it to remove restores for the other databases. I don't know offhand what the cPanel backup does for multiple databases (I have only one). Then you would upload and import this one database restore.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
Pages: [1]   Go Up
  Print  
 
Jump to: