Last active
April 26, 2016 21:34
-
-
Save JosephMaxwell/9a4f0295f7f848b7774f to your computer and use it in GitHub Desktop.
Make production Magento database into development-ready database
This file contains 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
# USAGE: cleanup.sh input-file.sql output-file.sql "www.production-site.com" "dev.production-site.com" | |
awk '!/INSERT INTO `customer_(entity|address)/' $1 \ | |
| awk '!/INSERT INTO `log_/' \ | |
| awk '!/INSERT INTO `m2epro_/' \ | |
| awk '!/INSERT INTO `sales_/' \ | |
| awk '!/INSERT INTO `report_viewed_/' \ | |
| awk '!/INSERT INTO `load_/' \ | |
| sed "s/$3/$4/; s/http:\/\/$3/http:\/\/$4/; s/https:\/\/$3/http:\/\/$4/" \ | |
> $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment