Last Saturday I decided to upgrade Spaniards.es to Drupal 6. I’ve been waiting for a long time, since Drupal 6 came out, basically because this site uses a lot of modules which weren’t available yet for the new version. Recently drupal.org was also upgraded and that was a decisive point for me.
It took me five hours to upgrade, but most of the process was making sure I had good backups copied on both servers but also downloaded to my personal computer. It takes a while to download a site like this!
Here is my log:
- Set Site Maintenance
- Set .htaccess maintenance redirect
- Stop MYSQL
- Backup spdba_main
- Backup public_html
- Rename public_html to public_html_5.15
- Create sym link to public_html:
ln -s public_html_5.15 public_html - Grab list of active modules
select filename, status from system where filename like '%.module' and status = 1; - Disable all non-core modules
- Download Drupal 6.9
- Delete sym link
rm public_html - Create sym link to Drupal 6
ln -s drupal-6.9 public_html - Copy default.settings.php to settings.php
- Update DB connection string
- Process to upgrade Drupal: www.spaniards.es/update.php
Once the DB was updated, it was a matter of installing all the modules and upgrading the DB when needed. Most of the staff worked fine. I had to do some fixes on my custom modules, specially for the new menu hooks.
Drupal 6 rocks.
I’m happy to see new posts in this blog :)
It looks that you have a well-defined approach for doing upgrades.
Have you automated the upgrading process or you do it manually instead?
If you do it manually, you probably use some kind of backup script, don’t you?
Quite interesting the fact that you rename the original folder, instead of removing or overwriting it. That makes me think about user contributed data (like images or other stuff uploaded for each user). So there are two possibilities, you have that data in the DB (which you probably don’t), or you use a different folder to separate the logic of the application from the user data, which I think is very clever and not everyone notices this.
Thanks for sharing the process!
I’ve done the upgrade process manually. For backup I used to use mysqldump, but not it is pretty slow since my DB is kind of big. For DB backups I use a perl script called mysqlhotcopy. Check it out, it’s pretty cool. It copies your full DB folder (if using MySAM) in a split of a second.
For the user uploaded data (files folder) and other custom stuff that I have inside misc folder, I copied them manually to the new folder after the upgrade process was complete. You don’t need all those files for the upgrade, so they are not needed during the process.
The idea of having them on a separate folder is pretty good. I’ll investigate how to do it, although I think Drupal settings don’t allow to go down the web root directory.
By the way, after a few days having the server upgraded, I removed the public_html sym link and renamed the folder drupal6.9 to public_html. This was basically because Drupal 6.10 came out and it didn’t make sense to me to have Drupal 6.10 on a folder called Drupal6.9 :)
But yeah, the sym links are very handy so I recommend using them when needed. Very important: do not forget to tell your Apache server to follow sym links :)
Mmmm… thinking about the files directory.. maybe the solution is a sym link :)
I agree, probably symlinks could be the best solution for files directory :)
Quite interesting the mysqlhotcopy script! I didn’t know about it.
Thanks for sharing all the stuff ;)