Last active
December 28, 2015 21:49
-
-
Save heyMP/7566884 to your computer and use it in GitHub Desktop.
Bash script for pulling product database down to local environment and one for pushing live database over to dev environment.
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
#!/bin/bash | |
drush @yoursite.prod archive-dump | |
rsync -rvz -e 'ssh -p 1855' --progress --remove-sent-files [email protected]:/home/yourusername/drush-backups /Users/yourusername/Documents/Websites/backups/productionserver |
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
#!/bin/bash | |
read -p "Pulling Prod down to Local. Are you sure? " -n 1 -r | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "Pulling Prod down to Local" | |
drush @yoursite.local sql-drop -y | |
drush sql-sync @yoursite.prod @yoursite.local -y | |
drush @yoursite.local dis securepages -y | |
drush @yoursite.local en coffee -y | |
drush @yoursite.local updatedb | |
drush @yoursite.local cc all | |
fi |
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
#!/bin/bash | |
read -p "Pushing Prod over to Dev. Are you sure? " -n 1 -r | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "Pushing Prod over to Dev" | |
drush sql-sync @yoursite.prod @yoursite.dev -y | |
drush @yoursite.dev dis securepages -y | |
drush @yoursite.dev en coffee -y | |
drush @yoursite.dev vset preprocess_css 0 -y | |
drush @yoursite.dev vset preprocess_js 0 -y | |
drush @yoursite.dev fr-all -y | |
drush @yoursite.dev updatedb | |
drush @yoursite.dev cc all | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment