Magento mysql backup fails to restore


Magento mysql backup may fail to restore with following error if mysql backup was taken using simple "mysqldump" command.

 

==========================================

ERROR 1005 (HY000) at line 4367: Can't create table 'db_name.core_session' (errno: 121)

ERROR 1005 (HY000) at line 4367: Can't create table 'db_name.core_store_group' (errno: 121)
==========================================

 

Solutions

1. Use a backup created using magento backup tool

2. Use the script http://files.bytehouse.co.uk/dump_magento_database.sh to create a mysql backup

 

===============================

wget http://files.bytehouse.co.uk/dump_magento_database.sh

bash dump_magento_database.sh

===============================

 

Just run script as "sh dump_magento_database.sh".
Script will ask for mysql user name, password, mysql hostname, database name
Once the details are provided, script will take backup

 

Credits

dump_magento_database.sh script  is a modified version of https://gist.github.com/steve-ross/9958274     


Thanks to https://gist.github.com/steve-ross   

Last update:
2015-07-16 10:03
Author:
Bytehouse Technical Support
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags

top