Upgrading your Drupal installation to the latest version

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
kbahey's picture
Start: 
2009-11-19 19:00 - 21:00 America/New_York
Event type: 
User group meeting

Upgrading your site isn't quite as simple as reading UPGRADE.txt that comes with the default Drupal installation profile and going off to the races. Depending on the complexity of a site, upgrading can be an involved process. However, with sufficient planning and patience even the most complex sites can be upgraded in a series of steps that on their own are quite simple.

In this talk, Andre Molnar will walk everyone through his upgrade planning process and highlight some tools that he uses to help get the job done.

Topics covered include:

  • Updates vs upgrades
  • Backing up your site
  • Update status module
  • Preparing a site for upgrade
  • Development, staging and production servers
  • Upgrading
  • Testing your upgraded site

About Andre Molnar:

Andre operates Be Circle: a web application development and consulting company that has specialized in Drupal for the past 5 years. Andre's first "web page" was online in 1994, but he started working professionally in web application development in 2000.
Other random highlights: Andre helped organize Drupalcamp Toronto 2008, made a Druplicon Munny (toy), and recently won a Nissan cube that he is decorating to help promote Drupal.

Come to the talk and you will get to the see the car!

Comments

Should be an interesting talk ...

kbahey's picture

I think that the Nissan Cube with the Druplicon eyes on it is reason enough to show up at the meeting.

However, the talk is informative too: upgrading sites built with core only is pretty straightforward. However, who builds sites that use only core modules? We all indulge in the 4,000 + contrib modules that are available for free on drupal.org. Then we realize how much more work we have caused for ourselves when it is time to upgrade ...

Come and hear what Andre Molnar has to say, ask questions, exchange ideas ...

See you all there on Thursday 19:00.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Slides

andremolnar's picture

Thank you to everyone that came out to the presentation. I had a great time.

As promised I have uploaded the slides to my site. You can download them from: http://becircle.com/Waterloo%20DUG%20November%2018%202009.pdf

You can also find the articles I wrote by following this link: http://becircle.com/how_upgrade_drupal_5_drupal_6

If you've got any questions, feel free to use the contact form here or on drupal.org to get in touch with me.

andre

Thanks Andre

kbahey's picture

Thanks Andre,

This was very informative ...

We had a new contingent from U of Guelph attending, Martin from London, and even one lady who came from Toronto.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Thanks -

lkjairath's picture

Thanks for a great presentation Andre - both in content and delivery, as well as knowledge, insight and expertise.

Thanks to Waterloo DUG for being great hosts - we, the group from UofG, felt very warmly welcomed, and thoroughly enjoyed the company of all and the discussions.

We are a web development group at UofG and have embraced Drupal platform about 1 1/2 years ago. We realize the benefits of community like Waterloo DUG and have plans to set up a formal Web Developer Community on campus. I sincerely think that our groups can mutually benefit from each other, and we look forward to more participation in the community and some day we may host a community presentation like that of yesterday - remember we are [almost] midway from Toronto :o)

Enjoy.

lalit

You are welcome

kbahey's picture

Lalit

You are welcome ...

Thank you and your colleagues who came to our meeting last week. I hope to see all of you often in our meetings.

Better yet, we would like to see presentations from your group on why you chose Drupal, how you are using it, which modules, what tricks/tips in content, code and themes you have, ..etc. ... etc.

Everyone benefits from these types of presentation. Everyone learns from what is presented, and you get feedback on perhaps easier/better ways to do things the next time.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

phpMyAdmin vs Backup and Migrate

mandclu's picture

Just thought I should add a couple of points about backing up your database, to expand on the discussion last night.

By default Backup and Migrate will exclude the data from cache and session tables but include the table structures, which you can do within phpMyAdmin, but it's a more time consuming, manual process.

On the other hand, phpMyAdmin can (depending on how it was installed) duplicate an entire database in a single operation, which is particularly handy if you're going to be testing on the same server. Give it the new name to dupe to do, click submit and you're done. As was mentioned last night, don't forget the critical step of of pointing your test site to the new database. ;-)

One annoyance I had when

deviantintegral's picture

One annoyance I had when doing database dumps with mysqldump was manually adding the ignore table statements, while preserving the table schemas (otherwise all cache writes will fail on your duplicate site).

I ended up creating a small script which I modify for each site I want to back up. Not only does it ensure that cache tables are dealt with properly, but that all database dumps have a consistent name (which is a problem with multiple developers).

Apparently the code filter is messing up backticks (`), which are used to surround the date command.

#!/usr/bin/env bash

DATE=date "+%Y%m%d"
USER=database-user-name
PASS=database-password
HOST=localhost-or-your-db-host
DATABASE=database-name
SITE=www.example.com
OUT=$SITE-$DATABASE-$DATE.sql

# Insert the tables to skip here. These tables will have only their schemas saved.
SKIPTABLES="cache cache_block cache_content cache_filter cache_form cache_menu cache_page cache_update cache_views"

# This builds the ignore parameters for us.
for i in $SKIPTABLES; do IGNORE="$IGNORE --ignore-table=$DATABASE.$i"; done;

# Save all of the data tables
mysqldump --add-drop-table $IGNORE -u $USER --password=$PASS -h $HOST $DATABASE > $OUT
# Append the schema of ignored tables.
mysqldump --add-drop-table --no-data -u $USER --password=$PASS -h $HOST $DATABASE $SKIPTABLES >> $OUT
bzip2 $OUT

Drush and backup workflow

scor's picture

Using a module or phpmyadmin for backing up my sites is something I'd rather avoid but that's just my personal opinion. I have a preference for the command line and cron jobs which ensure I don't forget to back them up. I'd recommend to look into drush and the sql dump command in particular which will save you a lot of this hardcoded lines above. Not only will it detect which site you want to backup (-r) and pick the right db credentials, but it'll also simplify your script since it has the right mysqldump parameters and you can specify which tables you want to ignore by placing a drushrc.php file in the Drupal root directory or sites/example.com/ (see the all the options of drushrc). There is more goodness on the way: I've created an issue/patch for improving the dump output and making it easy to integrate it with your favorite VCS (svn, bzr, git).

Drush does a lot more and many modules have started to integrate with it (coder, features, testing, etc.). Check out the main documentation it's worth starting it use it (As a matter of fact, Drush was recently added to the official debian unstable and testing packages!).

Best of both worlds?

mandclu's picture

drush is a fantastic tool and it's great to see how support for it is growing.

I should mention that those less technically inclined don't necessarily need to set up drush and a custom cron job. Backup and Migrate can also do scheduled backups, and also has the advantage that you can give client access to backup (and yes, ONLY backup) the site data to a local file, which gives them the ability to keep an offsite archive.

That said, they're also working on drush support in Backup and Migrate, so you could have the best of both.

That's pretty awesome. In my

deviantintegral's picture

That's pretty awesome. In my case, I have to deal with some 4.7 and WordPress sites as well, so we're still stuck with the above. But once we get more sites updated, I look forward to using Drush on all of them.

This was the largest turnout

deviantintegral's picture

This was the largest turnout I think we've had, and what a great presentation to go along with it! Thanks Andre!

Among the largest

kbahey's picture

I think we had two other sessions with similarly high turnout. I recall one session with 14 people, and another with perhaps 15 or 16 attendees. This one was 16 by my count.

Thanks again Andre. Great topic and great car!

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Thanks

andremolnar's picture

Thanks for the positive feedback. Also great to see the conversation continue.

re: backups: A good point was raised. i.e. you should move a copy of your backups off your server. As a best practice your regular backups (not necessarily just the ones you are doing for your ugdate/upgrade) should be moved to another location. Your backups do you know good if the hard drive on the server blows up and takes all your data (including backups) with it.

andre

Is there interest in learning about IT?

Dave Kinchlea's picture

Without intending to blow my own horn, I do have more than 2 decades of very large, process-based, IT administration experience on more computing platforms that most people are aware exist, but of most relevance here is that includes literally more than a dozen versions of Unix and Linux and just about every Windows environment ever made (save for Windows 7). I look at administration with a very wide view, it must accommodate the heterogeneous computing environment that virtually everybody is forced to live in to one extent or another.

I didn't just follow the Processes & Procedures, I authored and enforced them as I managed teams of IT administrators from around the globe. I am quite happy and prepared to share my knowledge with this group if there is interest. While I do not believe it is appropriate to treat every site the same, I do think that even simple sites that are essentially just personal blogs (which I'll assume by Andre's comments exist and are perhaps even commonplace?) are too much work not to put a bit of effort into ensuring they are there when you want them.

I am most happy to hear from other people!! but am quite willing to share any or all of the following if there is interest:

1) Application infrastructure (The Full Monty): Dev, Test, Production, Failover; Why, when, where, and how

2) Business Continuity: It ain't just about backup and recovery, it's about staying in business!

3) Performance: What is appropriate and when, How to measure, How to achieve; we can't all do Google-speeds...

4) Performance -- caching: What's available, appropriate, best, worst (this would include Drupal and non-Drupal options)

5) Security -- the basics: Who is the enemy, What to worry about; What not to worry about; How to monitor; Who to trust;

6) Security -- attacks: What is XSS, CSRF, Trojan, virus, worm, portscan, social engineering

7) Security - administration: SSH for security and performance; scripting for sanity; crontab; syslog; file system perms, RCS and more

8) Security -- tools: an overview of GnuGP/OpenPGP; SSL/TLS and configuring SNI, SSH tunnels, tripwire, Intrusion Detection, firewalls (types and misunderstandings)

9) Security -- Access control: Permissions in Drupal, what they are, how to administer, how to extend; interesting ACL-related modules

10) Administration: GUI vs Scripting (when to use one versus other); cool tools and how/when to use them (rsync, rdiff-backup, drush, phpmyadmin, sed, grep, perl, mysqltuner.pl & tuning-primer.sh)

11) Administration -- Overview: what is a: router, firewall, switch, hub, server, workstation, NAS, DAS, SAN, iSCSI, bootp, dhcp, bind/named, NAT, proxy, reverse proxy, load balancer (layer 3 and 5); (and why you need to know)

12) Administration -- Advanced: how to achieve 5-nines (99.999%) service (and what you should expect to spend); how, when (and when not) to perform "inline maintenance"; How to replicate mysql (and replicate the replica);

13) Service Level Agreements: What are they and what value do they bring? How do you create them? How do you measure them? When do you use them?

I'm simply not sure whether any of this is interesting to folks or not, I do enjoy presenting (and I miss doing it) but there is no hidden value in this for me except the joy all teachers feel. So if there is no interest (which is fine!) then I'm not insulted nor concerned.

I wanted to create a poll on groups.drupal.org but it doesn't seem possible, I keep getting hit by the spam filter asking for a captcha that doesn't exist....so I have created one on my site:
https://www.gatevillage.net/village/poll/waterloo-drupal-rug
but of course to vote you will need to create an account ... it's free and fairly easy, powered by Drupal of course.

President & CEO, Global Alliance of Trusted Experts
http://www.gatevillage.net -- South-Western Ontario's Drupal Community Building Site

Move the discussion here

kbahey's picture

Dave

Thanks for the ideas.

It is better to have the discussion here http://groups.drupal.org/node/36544

Pure IT topics are more suited elsewhere. But, if there is a Drupal aspect I think it should be considered, if there is interest.

And it is Waterloo Region DUG (Drupal Users Group).

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Done, but I have to say that

Dave Kinchlea's picture

Done, but I have to say that I think you missed an opportunity: Waterloo DRUG would be so much more fun to play with :-)

President & CEO, Global Alliance of Trusted Experts
http://www.gatevillage.net -- South-Western Ontario's Drupal Community Building Site