rev.dennis Posted November 6, 2014 Share Posted November 6, 2014 Here are the instructions and any hiccups or notes in regards to upgrading Open Atrium This is the recommended way of updating a standard Open Atrium distribution to ensure that Drupal core files are updated along with the Open Atrium distribution: 0) Backup Before starting the upgrade you should backup your all your code and your database. This is essential, so you can roll-back if something goes wrong during the update! # cp -avr /var/www/oa/ /var/www/oaBACKUP 1) Save the /sites directory The /sites directory contains all your site-specific customisation. So save this directory so that we can re-upload it in a later step. # cp -avr /var/www/oa/sites/ /var/www/oaBACKUP/ 2) Download the new files Download the latest version of Open Atrium from project page: https://www.drupal.org/project/openatrium 3) Upload the new files Replace the site's entire codebase with the new files. Do this by deleting the entire contents of the web root directory - the directory Open Atrium is installed in - completely, and then upload all the new files in their place. Note: Do not simply copy the new files on top of the old ones. This will not delete old files that are no longer used and this could cause issues. You should have your old web root backed-up just in case! # rm -rf /var/www/oa/# tar -zxvf openatrium-7.x-2.23-core.tar.gz -C /var/www/# mv /var/www/openatrium-7.x-2.23/ /var/www/oa/ 4) Replace the /sites directory Move or copy the /sites folder you saved in step 1 into the /sites folder of your new code. # cp -avr /var/www/oaBACKUP/sites/ /var/www/oa/ Don't forget to correct permissions (not sure this is correct thing to do but I did it) # chown -R www-data:www-data /var/www# chmod -R g+rw /var/www 5) Run updates Run update.php on your site: http://youropenatriumsite.com/update.php Or with drush: drush updb This will perform essential tasks to bring your database up-to-date with the latest version (if there are any). 6) Clear caches Clear the Drupal cache at: Admin - Configuration - Development - Performance - Clear all caches Or with drush: drush cc all Note: If you get errors then you may need to rebuild your registry. This is sometimes necessary if modules have moved around during the update. You can rebuild your registry with or without drush by following the instructions on the project page: https://www.drupal.org/project/registry_rebuild 7) Revert features Take extra caution here. drush fra -y (Read notes first)This command is required to update all of Open Atrium's features to the latest version. Running it will revert and overwrite any existing features, including any changes that you may have made to Open Atrium's configuration. It is therefore very important to capture any customization using Features Override before attempting to upgrade. This command can be run at any other time to restore Open Atrium's features to their default settings (Eg: if someone has inadvertently tampered with any Views or layouts within Open Atrium). 8) Done Your site is now up-to-date. Test it out! --- Advanced notes Updating the latest -dev version (for expert Drupal devs)If you built your site using "git" and "drush" then you can use these same tools to update your site. First, save a copy of your Drupal sites/ directory as this will be overwritten by the update process. Next, go to the "openatrium" folder where you initially used "git" to fetch the Open Atrium repository. Use "git pull" to retrieve the latest version of the distribution. Then run the ./build.sh or ./build-dev.sh script exactly as before. Instead of pointing these scripts to your root web directory, you can point them to a temp directory in case the installation fails. The build.sh scripts delete everything in the target directory so building to a temp directory prevents your current web site from being lost if the build fails. Once the build is successful you can move the temporary directory in place of your web root, then restore the /sites directory that you previously saved. If you just need to make a quick update of a specific open atrium module, you can also just go to that module directory and use "git pull origin" to pull in the latest changes without rebuilding the entire distribution. Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now