harshancx

Special Deployment

Aug 28th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. Procedure for Special Deployment
  2. August 28, 2017
  3.  
  4. Following are the steps required for this deployment:
  5.  
  6. Back up the production database
  7. Create a new database on webcms to hold 'good content'. Grant Drupal's user all permissions on this new database (you can find this user's information in /var/www/html/sites/default/local.db.inc.) Import the copy of ‘good content’ that was created on stagecms to this new database (so you don’t have to wait while webcms runs all the db updates; will save half an hour of having the site in maintenance mode)
  8. Create an html 'maintenance mode' template and save it to webcms in /var/www/maintenance_mode
  9. Create the directory /var/www/html/sites/default/files-private/smartling and set its permissions so that the web server user can write to it
  10. Put the site into Drupal's maintenance mode
  11. Make ‘good content’ the production db and ‘good users’ the ‘user_source’ db by changing /var/www/html/sites/default/local.db.inc
  12. Run the user migration
  13. Back up the production db (was ‘good content’ - now has both good content and good users)
  14. Make backup of the .conf file in /etc/httpd/sites-available
  15. Edit the .conf file, changing 'DocumentRoot /var/www/html' to read 'DocumentRoot /var/www/maintenance_mode'
  16. Restart apache
  17. Drop the production db
  18. Create the production db again with the same name - ensure that whatever user Stackbuilder uses to authenticate exists and has the necessary permissions
  19. Restore the backup from step 6
  20. Change the redirect so that site traffic goes to /var/www/html instead of /var/www/maintenance_mode (moving the backup file from 14 to replace the edited copy from 15.)
  21. Take the site out of Drupal maintenance mode
  22. Create a new database on webcms server 'transaction_log_restore'
  23. Import the database backup from line 6 to 'transaction_log_restore'
  24. Export all rows in edb_transaction_log from 'transaction_log_restore' that are not present in 'good content' database
  25. Import (via Postgres) those rows into edb_transaction_log table in production database
Advertisement
Add Comment
Please, Sign In to add comment