-
-
Save OdinsHat/4eb02ec8b1dd40dc4104 to your computer and use it in GitHub Desktop.
Run this one-liner in your Magento root to have the instaled DB dumped to the directory above with the filename the same as the dbname[.sql]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep 'user\|dbname\|pass' app/etc/local.xml | tr -d '\n' | sed 's/<username><\!\[CDATA\[\(.*\)\]\]><\/username>.*<password><\!\[CDATA\[\(.*\)\]\]><\/password>.*<dbname><\!\[CDATA\[\(.*\)\]\]><\/dbname>/ mysqldump -u\1 -p\2 \3 > ..\/\3.sql/g' | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment