Last active
November 10, 2016 23:05
-
-
Save keg/2716dd5f26d4a103385d to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
echo "*********VIP REPLACE SCRIPT STARTING**********" | |
##merge the sql files to one for easy import | |
echo "" | |
echo "Combining sql files in to one" | |
echo "" | |
{ echo "SET SQL_MODE='ALLOW_INVALID_DATES';" ; cat wp_*.sql ; } > combined_vaultpress_dump.sql | |
#remove the old sql files | |
echo "" | |
echo "Removing old sql files" | |
echo "" | |
rm wp_*.sql | |
#replace bad sql syntax | |
echo "" | |
echo "Replacing bad SQL, this can take a few minutes... :D" | |
echo "" | |
sed -i '' -e 's/SET NAMES ;//g' combined_vaultpress_dump.sql | |
echo "*****************ALL DONE*********************" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment