After breaking our site we are looking at a fresh install however do not want to lose customer data, such as customer logins and sales data, products etc.

Would it possible to take this information out of our existing database without including directories that were broken (from uninstalling a theme / module incorrectly)

Thanks a lot, William

  • is the admin also not working ? – Sunil Verma Feb 21 '18 at 14:25
  • Unfortunately not, we ended up reverting back to a previous backup to start the process of removing the broken theme / module. We ended up losing a few hours of data. – William Feb 21 '18 at 20:28

Yes you can just dump related to customer/sales/product one by one and import it to your new database, here is syntax to dump multiple table from database:

mysqldump -u username -p database_from__where_you_want_to_dump table1 table2 > name_of_sql_file.sql

then enter database password if any. After dump you can import the sql file to new db by :

use new_database_name;
mysql -u username -p new_database_name < your_dumped_sql_file_name;

So here you will have search table names related to customer/sales/product then use above syntax to dump and import.

Here are some query or you can google it:

show tables like '%customer_entity%';
show tables like '%product_entity%';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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