PloneExFile Migration HowTo

This migration HowTo was contributed by John Bohumil.

If you're having migration troubles it is worth the effort to
create a tiny test Plone site with just one example of each of your Products
and play around with migrating that until it works. THEN do your whole site.
On my system each attempt took over an hour when I used the whole site, but
with a small test site it only took a few minutes allowing me much less
frustration.

While I cannot define line by line every step I took here are the basic
details - I hope this helps others and that if others find this useful they
will post their suggestions.  Perhaps eventually Maik or someone could help
post some documentation.  This migration is complicated by the fact that it
required a new Python and a new Zope.


20 Steps

-- To accomplish this migration I knew I had to upgrade my Zope and Python.
I went with Zope 2.8.3 and Python 2.3.5.

1. Installed a second "local" version of Python specifically for this Zope
installation so as not to mess with the version being used by Fedora.

2. Installed the new Zope making sure to indicate where the special Python
was to be found.  I set this Zope up to run on a different port than your
current install.

3. Install the new Plone to this site and test it to make sure you have a
functioning empty Plone site.  You can go ahead and install the latest
version of PloneExFile and AttachmentField Product and make sure it works
with your new empty site.  If this all works go on to the next step.

4. Uninstall any uncessary products from your current Plone.  I had a few
odds and ends that were not really being used.  This step helps to limit the
variables.  Ideally I wanted to have only a vanilla Plone, with PloneExFile
and ZAAttachement

5. Create a new instance of your old Zope version.

6. Shut down the old Zope and copy your .fs data files from your current
live site into the copy you just made.

7. Start the new cloned instance of your old version of Zope.

8. Premigrate.  Copy the files from the migration folder of the new version
of PloneExFile into Extensions folder of the cloned Zope instance.  Add a
new External Method to the root of your Plone site in the ZMI.
External Method for premigration:

Id: PreMigrator
module: PreMigrator
method: migrate

Click the "test" tab.  You should see the results - a list of all the ExFile
objects which were PreMigrated.

9. Shut down your cloned Zope instance.

10. Copy your .fs file which has now been PreMigrated to your brand new Zope
version /var folder.

11. Start the new Zope instance and go to the ZMI

12,. In the ZMI use the PortalQuickInstaller to uninstall everything and
reinstall everything (perhaps only PloneExFile and AttachmentField)

13.  Migrate.  Copy the files from the migration folder of the new version
of PloneExFile into Extensions folder of the brand new Zope instance and
create a new External Method in the root of your Plone site in the ZMI.
External Method for migration:
Id: Migrator
module: Migrator
method: migrate


Click the "test" tab.  You should see the results - a list of all the ExFile
objects which were Migrated.  I had a few errors here about not being able
to delete some files, but I decided to rally on.

14.  In the ZMI go to portal_migration and go to migrate.  Migrate your
Plone to the new version. This takes a LONG time. This step needs to
complete sucessfully.  If you have problems, you may have to start over.  If
you are lucky you're almost home!

15.  In the ZMI go to portal_catalog / Advanced and click Update Catalog
button.

16. Go to your site and try to do some searches and verify that everything
looks great.

17.  Shut down the brand new Zope and modify the etc/zope.conf file to point
to the port your old live zope instance used to use, such as 8080.  Change
your boot script to run the zopectrl from the new zope.

18. Reboot or restart Zope and see that everything is working as planned.

19. Celebrate!

20. Post any exceptions or modifications to this list for others to learn
from!

