Personal tools
You are here: Home Migrating a Plone 2.0.5 portal to Plone 3.1.5.1
« September 2010 »
Su Mo Tu We Th Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
About this blog
the Softwerke blog
Recent entries
Timemap.js jsouthern 2009-03-26
Migrating a Plone 2.0.5 portal to Plone 3.1.5.1 jsouthern 2008-12-05
 
Document Actions

Migrating a Plone 2.0.5 portal to Plone 3.1.5.1

by John R. Southern posted at 2008-12-05 16:56 last modified 2009-01-07 10:27

Situation:

I have an export of the portal object (not the entire ZODB) for a Plone site which was residing in an old Plone 2.0.5 based instance. It needed to be moved onto a newer server which has Plone 3.1.5.1 running on it. As it turns out, the migration path isn't quite so simple.

Action:

Initially, I had exported the portal object and attempted to import it directly into the ZOPE instance on the new server. This, unfortunately didn't work at all. In fact, the portal_migration tool in Plone 3.1.5.1 doesn't even allow a portal from pre-Plone 2.1 to be migrated. So, this meant that the migration likely had to be performed in lock-step fashion, using increasingly newer versions of Plone.

The first step was to find a version of Plone (later than Plone 2.1) that was sufficiently old such that the portal_migration tool would allow a Plone 2.0.5 site to be migrated. With this migration performed, it should then (theoretically) be possible to export the portal object, then import it into a Plone 3.1.2 instance (3.1.2 just happens to be what's handy on one of my development boxes).

My first attempt involved installing Plone 2.5.5, as it's the final release in the Plone 2 series. The migration using it was unsuccessful, however, as it failed somewhere around the stage where it was migrating the site from version 2.1.4 to 2.5. So the next (and successful) attempt involved installing Plone 2.1.3.

With this in place, it was then possible to successfully migrate the site to Plone 2.1.3. And this was also good, as it's also above the minimum requirement of Plone 2.1. After going through the newly migrated site, it was also necessary to perform a few checks to make sure that the site was still functional. It was.

Next, I exported the portal object and attempted to import it directly into the ZOPE instance with Plone 3.1.2 installed. In the spirit of the previous luck, this also failed. However, it wasn't a failure which would require migration using another intermediate Plone version. The failure was simply due to the fact that there were a couple of MIME types which were missing from the mimetypes_registry. So, in the Plone 2.1.3 site, I added the following MIME types to the mimetypes_registry:

  • Name, Mime-types, Extensions, Globs, Binary?
  • Web Intelligent Plain Text, text/x-web-intelligent, {blank}, {blank}, no
  • Markdown, text/x-web-markdown, markdown, {blank}, no
  • Textile, text/x-web-textile, textile, {blank}, no

With these added, the portal object was exported once again, then re-imported into the Plone 3.1.2 instance. This time, the import was successful. Next step: attempt to use the portal_migration tool on it. And of course, this again failed.

This time the error was as follows:

  • Attempting to upgrade from: 2.1.4
  • Upgrade aborted
  • Error type: exceptions.NameError
  • Error value: global name 'chain' is not defined

OK, so I was likely trying to take too large a step again. Hence, the next step was to setup a Plone 2.5 instance and import the portal into it, then perform the portal_migration dance.

A Plone 2.5.5 instance was created and the portal imported successfully. Upon using the portal_migration tool, there was a minor problem but it was due to a group in the acl_users folder which needed to be fixed. Once this was corrected, the portal_migration tool happily went about its business and updated the site from 2.1.3 to 2.5.5. The portal_atct tool also wanted some attention, as next to its icon was a red exclamation point. Upon inspection, the tool notified me that the version of ATContentTypes on the filesystem was newer than what was in the portal. This too was quick to update.

At this point, I had a portal which had been successfully updated from Plone 2.1.3 to Plone 2.5.5 which was finally exported.

The exported portal was copied back over to the import folder on the server with the Plone 3.1.2 instance and re-imported. As before, the import was successful. However, unlike with the previous attempt, the portal_migration step was also successful this time. Finally: a working Plone 3 version of the portal. The last step was to verify that everything in the site was still functional after the upgrades. From this point, the final migration from Plone 3.1.2 to 3.1.5.1 would be a non-event.

Result:

Though it was possible to migrate the portal, using the above process I did notice one problem afterward which is that all of the objects within were now owned by the ZOPE admin user account that was used to perform the migration. So some adjustments to the process will be required to avoid this problem.

(Note: the Plone Upgrade Guide is also a helpful resource with respect to this topic.)



Category(s):
migration
Plone

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: