Project

General

Profile

Actions

DrupalDrushUpdate » History » Revision 34

« Previous | Revision 34/50 (diff) | Next »
Andreas Kohlbecker, 07/04/2016 04:29 PM


Updating EDIT DataPortal multisite installations with Drush

Requirements

Important

  • *WARNING !!!! * do not upgrade the zen theme !!!!

Step by step

  1. jump into the drupal root folder
cd ${DRUPAL_HOME}
  1. Set all portals into maintenance mode
dataportals-drush vset -y maintenance_mode 1
  1. make sure all databases are updated
dataportals-drush updatedb
  • If drush freezes at some point you may want to check that the CDM-Server which is configured for the portal in question is available. If the server is absent this will prevent drush from proceeding.

make sure the update mudule is enabled for all sites

dataportals-drush pm-enable update --yes
  1. remove the symbolic links in the profiles folder in the drupal root, these symlinks would otherwise cause problems in drush when creating the backup
cd profiles
rm CDM_*
cd ..
  1. Choose the URL of a dataportal which is NOT using the zen based base theme and run the following command for one dataportal installations
drush -l <site-url> up

Examples for edit-test and edit-prod:

drush -l http://test.e-taxonomy.eu/dataportal/preview/palmae-test/ up
drush -l http://www.palmweb.org/ up
  1. restore the symbolic links in the profiles folder. In the following example we assume that the dataportal module is installed in ../sites/_dataportal-production/modules/
cd profiles
ln -s ../sites/_dataportal-production/modules/cdm_dataportal/profile/CDM_Portal
ln -s ../sites/_dataportal-production/modules/cdm_dataportal/profile/CDM_Portal_Testing
cd ..
  1. fix ownership
chown -R www-data:www-data ./
# in case the ./sites/_jenkins-workspace exists:
chown -R jenkins:www-data ./sites/_jenkins-workspace
  1. restore the .htaccess and robots.txt files by merging the files that have been copied to the ~/drush-backups/..../drupal folder by merging them with the new files. Do not just copy them over. You can use vimdiff for this, here is a brief tutorial
cp ~/drush-backups/drupal7_dataportal_production_palmae/TIMESTAMP/drupal/.htaccess .htaccess-last
cp ~/drush-backups/drupal7_dataportal_production_palmae/TIMESTAMP/drupal/robots.txt robots.txt-last

vimdiff .htaccess .htaccess-last
vimdiff robots.txt robots.txt-last
  1. now update database for all other sites of the multisite installations
dataportals-drush updatedb --yes
  1. check for missing updates in all portals and update portals for which pending updates have been detected individually
dataportals-drush ups
  1. test the sites

  2. Turn off the maintenance mode in all portals except those which are listed in http://wiki.bgbm.org/bdinotes/index.php/EDITDataPortalList#edit-test as "Undisclosed Portals (must be in maintenance mode)"

dataportals-drush vset -y maintenance_mode 0

IMPORTANT*: Immediately disable the *Undisclosed Portals!!!!!

  1. if everything is ok you can remove backup folders which are usually in ~/drush-backups/

Updated by Andreas Kohlbecker over 7 years ago · 34 revisions