Skip to content

Instantly share code, notes, and snippets.

@KINKCreative
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KINKCreative/9755697 to your computer and use it in GitHub Desktop.
Save KINKCreative/9755697 to your computer and use it in GitHub Desktop.
Magento - Backup and Restore DB from Command Line
# CREATE CATEGORIES IN YOUR SYSTEM (MEN/WOMEN/KIDS and WOMEN/SHOES, WOMEN/JEWELRY, MEN/SHOES and KIDS/SHOES)
# Update the ID's in the top of shopify_import.php ($category)
# BACKUP
sudo mysqldump -p magentodb > magentodb.sql
#this saves the whole DB, incl users and categories
#switch to shopify-import branch, pull
#on your local machine run shopify_import.php, for me it's
# http://192.168.33.10/shopify_import.php
#AFTER error / crash, restore the db with this
# RESTORE DB
sudo mysql -p magentodb < magentodb.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment