1

I'm running into a big problem with my Magento stores, 4 months ago I installed the latest version of Magento (1.9) into my server, I created 2 different stores, I created categories, I added over 300 products, made a lot of customization, I had about 60 sales or so, I had some customer sign ups, created sitemaps, created widgets, integrated PayPal, USPS shipping methods, coupons, etc. While editing ftp accounts on cpanel one of them was accidentally deleted, this caused the complete Magento installation files to be deleted, I had a recent backup that I was relying on, it turns out that this backup .tgz file never finished and was incomplete and corrupted, however it seems that the media file did finish, I then turned to my hosting company to see if they had backups, they told me they removed my account of their daily backups 4 months ago due to excessive inods abuse, all I have now is my Magento DB and a backup of my products in a csv file, here is the big question, how can I restore my DB into a new installation, this data is what's most important for me, I don't mind doing the customization again, all I want is the Customers, Sales, Products, etc into the new installation.

1 Answer 1

0
  • Create a file named local.xml under app/etc/ folder and put below content into that file:

<?xml version="1.0"?> <!-- /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE_AFL.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> <config> <global> <install> <date><![CDATA[Wed, 15 Jun 2016 14:08:02 +0000]]></date> </install> <crypt> <key><![CDATA[da1f934273a6047d404b7ead7b34d831]]></key> </crypt> <disable_local_modules>false</disable_local_modules> <resources> <db> <table_prefix><![CDATA[]]></table_prefix> </db> <default_setup> <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[mage1]]></username> <password><![CDATA[stpl123#]]></password> <dbname><![CDATA[mage1]]></dbname> <initStatements><![CDATA[SET NAMES utf8]]></initStatements> <model><![CDATA[mysql4]]></model> <type><![CDATA[pdo_mysql]]></type> <pdoType><![CDATA[]]></pdoType> <active>1</active> </connection> </default_setup> </resources> <session_save><![CDATA[files]]></session_save> </global> <admin> <routers> <adminhtml> <args> <frontName><![CDATA[admin]]></frontName> </args> </adminhtml> </routers> </admin> </config>

Change values of host, username, password and dbname tags.

  • Login to phpmyadmin or management panel and select appropriate DB name, then click on import button, browse database backup file and click save button.

After import is complete, database will be fully functional for new instance of magento.

Note: If required, change values of unsecure_base_url and secure_base_url in core_config_data table.

Please let me know if you find any problem.

6
  • Can I import over the existing DB or the DB has to be empty? Thank you!
    – jdlm
    Commented Aug 26, 2016 at 4:31
  • You need to drop all previous tables before you start import. Commented Aug 26, 2016 at 4:37
  • THANK YOU! Mohit Kumar Arora, I have a lot of work of to do, putting everything together, adding the second store, re-customizing and this time I will make sure I have reliable backups! Thanks again!
    – jdlm
    Commented Aug 26, 2016 at 5:57
  • Please upvote if it helped. :) Commented Aug 26, 2016 at 6:46
  • @MohitKumarArora, is this applicable for site running on Magento 2.2.x to upgrade to latest 2.3.4 as well assuming that all I care about is data like this question? I am thinking of using Bitnami Magento 2.3.4 VM and import existing site data into it to be up and running, will that work so that I don't have to do any manual install?
    – cnu
    Commented Feb 19, 2020 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.