Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

DB Restore Issue
 
rtroth2946
Jr. Member
 
Total Posts:  13
Joined:  2012-04-25
 

Hello all,

Just wanted to put my issues out here to see if I can get a little assistance from anyone.

Situation is this:

Got referred to this problem because the original devs went dark on the site owners.  I have ZERO experience with Magento prior to this but have worked with PHP carts before and other CMS systems.

Somehow, the site owner screwed up their database over a month ago, yet I get called to help now.  Joy!  I get GoDaddy to restore their site and their database as close to the death date as possible.  I am trying to restore the database, which is massive(2.1GB).  I managed to get direct access to it and start the import the SQL script but I keep getting errors of this variety:

Duplicate entry \'1\' for key 1

Is there a way to disable the key restraints and get the database loaded back up?  I\’m really at a loss because working with such a large file is so time consuming just to open files, save them and execute them. 

Currently I\’ve had this error appear in the following tables, and am expecting it to occur in others:

core_store
core_store_group
core_website
customer_group

Any advice would be helpful at this point as I want to simply get the DB back to where I found it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagenX
Enthusiast
 
Total Posts:  791
Joined:  2008-05-26
Dublin
 

go to your db via ssh
to dump => mysqldump -u root -proot_password --opt database_name > dump.sql
to load => mysql -u root -proot_password database_name < dump.sql

just a few seconds…

cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
rtroth2946
Jr. Member
 
Total Posts:  13
Joined:  2012-04-25
 

I can’t seem to get root access to the hosting account.

joy...tried a few ways and no joy. 

Any other options?

If I was able to get access to root on the hosting account, how do I push the SQL file into the DB?  In the above script it points to a SQL file, which is great, but Putty needs to know where to find said SQL file.  I’m a bit of an SSH noob too.  I tend to use more GUI tools.  Apologies for my noobie-ness...but any help is greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rtroth2946
Jr. Member
 
Total Posts:  13
Joined:  2012-04-25
 

Not confirmed, but I appear to have found the solution.

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/restoring_a_backup_of_a_magento_database

Will follow up when/if it completes and I have a working installation.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top