-1

In about a week, I have to update several production sites hosted in AcquiaCloud environments to 8.5.3. All of these sites receive frequent real-time DB writes from user-submitted content. I can request that the site be put into maintenance mode to limit user interactions with the DB, but I cannot, under any circumstance, lose any data whatsoever during the process of upgrading production to 8.5.3 from 8.4.3.

There are, as you know, several db schema changes/updates between the two versions and I am using modules in these sites that frequently alter the schemata between releases; i.e. Multiversion/Revisions, Workspaces, Workflow Moderation, etc.

What is the best practice to pull down my production database, reconcile it and get it working against my dev 8.5.3 environment, and safely send it back up to prod? Getting 8.5.3 working with the current schema of the production 8.4.3 site took a ridiculous amount of debugging, troubleshooting, and work to get a mostly-functional site. I feel like I'm missing something here. Can anyone offer advice on reconciling my two environment databases? Thanks in advance, any help is appreciated!

  • Why are you people down-voting my post instead of trying to be helpful? Ridiculous. – Jordan J. Apr 27 '18 at 17:38
  • One way to do it is copy prod database down, set the site to maintenance mode and request no admins be in the site. Get the database updated, then copy that back to prod with the new code. That way you don’t have to run updates on prod. I’ve done that. I took a fairy big update that took five hours to perform and test, then doing it for real only seemed like 5 seconds of downtime. – Kevin Apr 27 '18 at 21:13
  • @Kevin I should expect heavy debugging, right? So far, in my tests leading up to now, even just updating prod from 8.4.3 to 8.4.8 or 8.5.1 breaks....everything, it seems like. – Jordan J. Apr 27 '18 at 22:28
  • I don't know what you can expect. It depends on what you are using. But definitely don't do it all in prod.. thats what I provided the shortcut. Take a prod db snapshot and try the upgrade locally, debug it, write down the steps/patches/whatever.. do some dry runs.. then when you are ready, put the site in maintenance mode, take a prod db snapshot, apply the updates, then RESTORE production with that database and deploy the code. That way you're not risking breaking production. I did this for one of the 12 projects I manage because I had to mitigate some modules with patches and test it out. – Kevin Apr 27 '18 at 22:33
  • ^ that whole method, when you have it down, shouldn't take any longer than 2 minutes to complete deploying it to prod. You can alternatively attempt to update production with your steps, but if you are worried about breaking the site, do it the other way. Take plenty of database backups. – Kevin Apr 27 '18 at 22:34
0

The only ways I see for you to do it properly on Acquia are :

  • Automation
  • Maintenance mode

You will either need to be able to pull a copy of the database down to the staging environment, deploy the code change and do the updates without having to change anything manually OR put the production site down while you update them.

I know no easy tool to resync content between two installation of Drupal that won't assure you at 100% you have not lost data.

If data integrity is important, put the site down, update them then put them online. It's always better to show a "maintenance in progress" message to users than errors or send out a message about lost data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.