You are here: Home / Blog / posts / Pixelworkers of CAES DO / “If it ain’t broke, don’t fix it” But what if I want to upgrade?

“If it ain’t broke, don’t fix it” But what if I want to upgrade?

by randles — published Nov 12, 2010 03:50 PM, last modified Jan 28, 2014 02:54 PM
How we upgrade a Plone 2.5 site/server to Plone 3 while keeping the Plone 2.5 site/server online for a seamless transition

Part 1 the getting ready

We have a Plone 2.5 server that is chugging along like an old truck, it requires little to no maintenance and is extremely dependable.  However, now that Plone 4 is out we are feeling a bit self-conscious about our old truck. So the time has come, we will be upgrading our Plone 2.5 sites to Plone 3.x.
For this upgrade we will need three Plone servers:

  • Our original Plone 2.5 server (server A)
  • A new identical Plone 2.5 server (server B)
  • The new Plone 3 server (server C)

Part 2 preparing the server to be upgraded to Plone 3

  1. Stop Plone on server A
  2. Stop Plone on server B
  3. Rename the data.fs on server B to data_old.fs
  4. On server B use scp to copy the data.fs from server A
    1. cd /usr/local/Plone/zeocluster/server/var/ (or wherever your Data.fs is)
    2. scp username@serverA:/home/zope/zeoserver/var/Data.fs . (note that last period!)
  5. Start Plone on server B and make sure Plone starts up correctly

Part 3 preparing the site(s) to be upgraded to Plone 3

On server B in the zmi for each site:

  1. use the “portal_quickinstaller” uninstall all non-standard Plone products.  For us this is “PloneCASLogin” and “AnalyticsForPlone.”
  2. in portal_skins/custom rename:
    1. main_template and plonecustom.css
    2. to main_template_old and plonecustom_old.css

Part 4 moving the site(s) to a Plone 3 server

There are two ways to move a site to server C.  The first way is the more Plone.org approved: moving the data.fs. The second way is the shunned and specifically outlawed way: moving the zexp

Moving the entire server with the Data.fs

  1. Stop Plone on server B
  2. Stop Plone on server C
  3. Rename the data.fs on server C to data_old.fs
  4. On server C use scp to copy the data.fs from server B
    1. cd /usr/local/Plone/zeocluster/var/filestorage/
    2. scp username@serverA:/home/zope/zeoserver/var/Data.fs
  5. Start Plone on server C and make sure Plone starts up correctly

Moving one site with the zexp

  1. Log into server B's ZMI directly (bypassing all load balancers, for us this is http://serverB:8080/manage)
  2. Check the check box next to the Plone site and click "import/export" at the bottom
  3. Click "export" the defaults are:
    1. Export object id: the site name
    2. Export to: save to server
    3. XML format?: unchecked
  4. When zope is done exporting the website the page will redirect to the ZMI and display a message at the top saying "The site has been successfully exported to /usr/local/Plone/zeocluster/client1/var/WebSite.zexp"
  5. SSH into server C
  6. Copy the .zexp from server B to server C for both client1 and client2 using scp
    scp zope@serverB:/usr/local/Plone/zeocluster/client1/var/WebSite.zexp /usr/local/Plone/zeocluster/parts/client1/import
    scp zope@serverB:/usr/local/Plone/zeocluster/client1/var/WebSite.zexp /usr/local/Plone/zeocluster/parts/client2/import
  7. Log into server C's ZMI directly (bypassing all load balancers, for us this is http://serverC:8080/manage)
  8. Click "import/export" at the bottom of the ZMI
  9. On the lower half of the screen, in the "import" section, click the drop down and select "WebSite.zexp"
  10. Click import and wait, when zope is done importingthe website the page will redirect to the ZMI and display a message at the top saying "The WebSite has been successfully imported!"

Part 5 upgrading the specific Plone site

  1. Log into server C's ZMI directly (bypassing all load balancers, for us this is http://serverC:8080/manage)
  2. Click on the Plone SIte you want to upgrade, WebSite, click portal_migration there should be a red ! next to it
  3. Check "Dry Run Mode" (to make sure the upgrade will work without permanently modifying it) and click "upgrade"
  4. When you get the message "Migration has succeeded" go back to portal_migration and click upgrade
  5. Once the upgrade has succeeded load up your site http://serverC/Plone and it should have your content and the default plone skin!

 

When:

Where:

Contact