Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. ### How to import DB
  2.  
  3. Please run the following commands:
  4.  
  5. #### Stopping services that may interfere the import process:
  6. ````
  7. sudo /var/www/scmp_outage/start-outage.sh
  8. sudo /usr/bin/supervisorctl stop all
  9. sudo /etc/init.d/php5-fpm stop
  10. ````
  11.  
  12. Sometimes database import failed with 'DUPLICATE PRIMARY KEY' error, which is probably because the cron process is still running during the import.
  13.  
  14. To stop the cronjob - stop supervisor
  15.  
  16. ````
  17. sudo service supervisor stop
  18. ````
  19.  
  20. To make sure no emails are sent from dev during prod db restore
  21.  
  22. ````
  23. sudo service postfix stop
  24. ````
  25.  
  26. To make sure no residual drush commands still running (after supervisord stopped)
  27.  
  28. ````
  29. sudo killall drush
  30. ````
  31.  
  32. #### Starting the import:
  33. ````
  34. drush @standalone sql-drop -y
  35. bunzip2 -c db.sql.bz2 | drush @standalone sqlc
  36. ````
  37.  
  38. #### Clearing cache, update DB and resume services:
  39. ````
  40. sudo /etc/init.d/memcached restart
  41. drush @standalone env-switch development
  42. sudo /etc/init.d/rabbitmq-server restart
  43. drush @standalone updb -y
  44. drush @standalone cc css+js -y
  45. sudo /etc/init.d/php5-fpm start
  46. sudo service supervisor start
  47. sudo /usr/bin/supervisorctl start all
  48. sudo /var/www/scmp_outage/stop-outage.sh
  49. sudo service postfix start
  50. ````
  51.  
  52. #### Confirm the imported DB version:
  53. ````
  54. drush @standalone vget dpkg_version
  55. ````
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement