Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### How to import DB
- Please run the following commands:
- #### Stopping services that may interfere the import process:
- ````
- sudo /var/www/scmp_outage/start-outage.sh
- sudo /usr/bin/supervisorctl stop all
- sudo /etc/init.d/php5-fpm stop
- ````
- Sometimes database import failed with 'DUPLICATE PRIMARY KEY' error, which is probably because the cron process is still running during the import.
- To stop the cronjob - stop supervisor
- ````
- sudo service supervisor stop
- ````
- To make sure no emails are sent from dev during prod db restore
- ````
- sudo service postfix stop
- ````
- To make sure no residual drush commands still running (after supervisord stopped)
- ````
- sudo killall drush
- ````
- #### Starting the import:
- ````
- drush @standalone sql-drop -y
- bunzip2 -c db.sql.bz2 | drush @standalone sqlc
- ````
- #### Clearing cache, update DB and resume services:
- ````
- sudo /etc/init.d/memcached restart
- drush @standalone env-switch development
- sudo /etc/init.d/rabbitmq-server restart
- drush @standalone updb -y
- drush @standalone cc css+js -y
- sudo /etc/init.d/php5-fpm start
- sudo service supervisor start
- sudo /usr/bin/supervisorctl start all
- sudo /var/www/scmp_outage/stop-outage.sh
- sudo service postfix start
- ````
- #### Confirm the imported DB version:
- ````
- drush @standalone vget dpkg_version
- ````
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement