Drupal 5.5 upgrade to 6 fails

On Saturday I tried upgrading to Drupal 6 (from 5.5) and the upgrade scripts failed resulting in a rather horrible frankensite. I have not had time to debug the issue (it appears to have been a table conflict resulting in many invalid SQL statements that ended up corrupting the database used by Drupal). The good news is that recovery is quick and painless.

If you have not yet upgraded make sure you have a backup of your database, and install into a new location, not over your existing install (you can use symbolic links to preserve the name of the location you install to). To backup your database you can use mysqldump:

mysqldump -u adminuser -p databasename > backupfile.sql

where adminuser is the admin user account of your database server, databasename is the name of your drupal database, and backupfile.sql is the backup file that will be created. It will prompt you for your adminuser password.

To restore after the Drupal upgrade script does horrible things to your site, you need to:

  1. Drop the old database:
    mysqladmin -u adminuser -p drop databasename
  2. Create an empty database where the old database used to be:
    mysqladmin -u adminuser -p create databasename
  3. Re-load the database from the backup file:
    mysql -u adminuser -p databasename < backupfile.sql

Your site should now be restored and ready to use.

 

Reply

The content of this field is kept private and will not be shown publicly.
Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.