Migrating Plone site

I have been given a legacy Plone (4206) site to migrate from a FreeBSD 9 server that I do not have full access to. I plan to deploy the site on a new Debian VM and migrate to a newer version. I have a full backup of the site directory (data.fs etc.). However, I am unable to install a new instance of Plone 4.2. I have tried to install 4.2 on Debain 8 & 9 and also macOS Catalina and get similar errors on all platforms (see below from Debian 9).
I have successfully installed Plone 4.3 on a new VM, but when the old site filestorage is copied over @@plone-upgrade shows errors resulting from the difference between the 4.2 data and the 4.3 site.
The live 4.2 site @@plone-upgrade page says that 'Your site is up to date', so there does not seem to be a way to upgrade to 4.3 on the live server. Do I need to install an instance of 4.2 locally first in order to start the migration, if so how? I would be grateful if you could advise a viable migration path. Thanks.

Installing Python-2.7.3. This takes a while...
Installing distribute...
/usr/local/Plone/Python-2.7/bin/easy_install missing. Aborting.

Installation has failed.
See the detailed installation log at /home/john/Plone-4.2-UnifiedInstaller/install.log
to determine the cause.
$ tail /home/john/Plone-4.2-UnifiedInstaller/install.log
    self.cmdclass[command] = cmdclass = ep.load()
  File "/home/john/Plone-4.2-UnifiedInstaller/packages/distribute-0.6.24/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/home/john/Plone-4.2-UnifiedInstaller/packages/distribute-0.6.24/setuptools/command/easy_install.py", line 25, in <module>
    from setuptools.package_index import PackageIndex
  File "/home/john/Plone-4.2-UnifiedInstaller/packages/distribute-0.6.24/setuptools/package_index.py", line 10, in <module>
    from md5 import md5
  File "/usr/local/Plone/Python-2.7/lib/python2.7/md5.py", line 10, in <module>
    from hashlib import md5
ImportError: cannot import name md5

That is strange: hashlib should have md5.

Are you sure you have the system requirements fullfilled? Plone typically requires that for some (system related) libraries the development (and not only the production) packages are installed.

Thanks. I think the issue might be the Debian system python 2.7 not being built with SSL support. Looking at the system requirements I need the following:
Python 2.7 (dev), built with support for expat (xml.parsers.expat), zlib and ssl
What is the best way to build this?

One way is to build a local python - as follows:

  • fetch the Python source code and unpack
  • run ./configure
    use ./configure --help to learn which options are supported and use the options adapted to your requirements
  • run make; make tests; make [alt]install

The make builds all extensions whose dependencies (on system libraries and packages) are fulfilled. Some extensions depend on "*-dev" packages. To learn about the dependencies of a specific extension, look into Modules/Setup. This tells you which (system) libraries and corresponding includes are required. You must use utilities of your package management system (e.g. apt-file) to find out which system package contains the required resources.

1 Like

Thanks so much, this solved the issue! :grinning:

There seems to be an issue specifically with the 4.2 UnifiedInstaller and Debian's Python 2.7. It seemed to be enough just to configure the Python location and then make. In case of future reference, these were the steps I followed:

1) Get Python 2.7.18

sudo wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
sudo tar -xf Python-2.7.18.tgz
cd Python-2.7.18/
./configure --help

2) Install dependencies

sudo apt-get install python-setuptools python-dev build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev libjpeg62-turbo-dev libz-dev
sudo apt-get install libreadline-dev wv poppler-utils

3) Run Python configure and make

./configure --prefix=/usr/local/Plone
sudo make && sudo make install

4) Download and Install Plone 4.2

wget --no-check-certificate https://launchpad.net/plone/4.2/4.2/+download/Plone-4.2-UnifiedInstaller-update-1.tgz
tar -xf Plone-4.2-UnifiedInstaller-update-1.tgz
cd Plone-4.2-UnifiedInstaller
sudo ./install.sh standalone --password=mypassword --target=/usr/local/Plone --with-python=/usr/local/Plone/bin/python2.7

5) Buildout and run Plone

cd /usr/local/Plone/zinstance/
sudo bin/buildout
sudo -u plone /usr/local/Plone/zinstance/bin/plonectl start
1 Like

Plone Foundation Code of Conduct