Migrate between eduCommons versions

Older migration instructions available here.

Migrating to eduCommons 3.2.1-final

Preparation

A few things you should do before beginning the migration:

  1. VERY IMPORTANT: SAVE A BACKUP OF YOUR Data.fs FILE, which is located in the [old instance home]/var directory of your eduCommons site. This file contains all of the content for your site. (This way you will able to restore your file from this Data.fs file if anything goes wrong.)
  2. Verify that your current instance is eduCommons-3.1.1-final.

Migration of eduCommons 3.1.1-final to 3.2.1-final

The migration eduCommons from version 3.1.1-final to version 3.2.1-final includes the following:

  1. Pre-migration of Data.fs in version 3.1.1-final
  2. Movement of Data.fs file to a new 3.2.1-final instance
  3. Migration to the eduCommons 3.2.1-final instance
  4. Delete Old site and rename new site
  5. Repackage Course Downloads
  6. Final steps

Pre-migration of Data.fs in version 3.1.1-final

For this step, you will need:

  • contentmigration Plone Add-on Product, available at http://pypi.python.org/packages/source/P/Products.contentmigration/Products.contentmigration-1.1.zip
  • to copy the migration source code found in version 3.2.1-1.
  • IMPORTANT UPDATE: The pre-migration script has been updated, and can be found here: https://educommons.com/svn/eduCommons32/enpraxis.educommons/trunk/enpraxis/educommons/extras/PreMigrate.py
    • Copy this into [old instance]/Products/eduCommons/Extensions

IMPORTANT UPDATE: In your 3.1.1-1 final instance a python library needs to be updated:

  • Library Location: /instancehome/lib/python/
  • Library Name: plone.app.linkintegrity
  • Old Version :: 1.0.5
  • New Version :: 1.1
  • Download here: http://pypi.python.org/packages/source/p/plone.app.linkintegrity/plone.app.linkintegrity-1.1.zip#md5=7bb10d39fc422b3e6f22b7706532fe57

Add contentmigration product by following these steps:

  1. Download the product from the aforementioned URL (http://pypi.python.org/packages/source/P/Products.contentmigration/Products.contentmigration-1.1.zip)
  2. Unzip the product. Products.contentmigration needs to be placed in the Products directory of your 3.1.1 instance. For example: /opt/Zope-2.10.6/edu311/Products
    In addition, since it is currently only available as an egg, you will have to extract only the contentmigration directory into the aforementioned products dir.
    When you unzip the package from http://pypi.python.org/packages/source/P/Products.contentmigration/Products.contentmigration-1.1.zip, it will look like a typical python egg:
    Products.contentmigration-1.1
    –Products
    —-contentmigration
    That is the actual ‘Zope2 Product’ that needs to be moved into your 3.1.1 Products directory.
  3. Restart zope

Run the migration script by following these steps:

  1. Open your 3.1.1-final eduCommons site in the ZMI. (click educommons Setup, then click Zope Management Interface.)
  2. From the drop down menu, select “External method” and click the Add button.
  3. Enter the following parameters:
    • Id: PreMigrate
    • Title: PreMigrate
    • Module Name: PreMigrate
    • Function Name: pre_migrate_3_1_1_to_3_2_1
  4. Click Add
  5. Click on the PreMigrate script you just added
  6. Click the test tab.
  7. Verify that the method ran successfully. (It should give you feedback.)
  8. IMPORTANT UPDATE: If you receive the following error during PreMigration related to a LanguageIndex, you need to update [old instance home]Products/LinguaPlone/LanguageIndex.py. You can download the latest from here: http://svn.plone.org/svn/plone/Products.LinguaPlone/trunk/Products/LinguaPlone/LanguageIndex.py

Movement of Data.fs file to a new 3.2.1-final instance

For this step, you will move the Data.fs file from the old instance to the new instance. First of all, install an eduCommons-3.2.1-1-final instance using the installations instructions found in [new instance home]/eduCommons/docs/. Stop both sites. Then copy the Data.fs file from the var directory of the old site to the var/filestorage directory of the new site:

sudo cp -rvfp [old instance home]/var/Data.fs [new instance home]/var/filestorage

Migration to eduCommons 3.2.1-final instance

eduCommons 3.2.1-final uses the portal_setup tool to perform the necessary upgrade from 3.1.1 to 3.2.1-final. Due to the fact that eduCommons and it’s dependencies were moved to python eggs, we must start with a new eduCommons site. The migration script will then copy and past content and relevant settings to the new installation:

  1. IMPORTANT UPDATE: The pre-migration script has been updated, and can be found here: https://educommons.com/svn/eduCommons32/enpraxis.educommons/trunk/enpraxis/educommons/upgrades/v3_1_1_to_3_2_1.py
  2. Navigate to the root of your ZMI instance and create a new eduCommons site called eduCommons321
  3. Open your new 3.2.1-final eduCommons site in the ZMI. (click educommons Setup, then click Zope Management Interface.)
  4. Navigate to portal_setup
  5. Press the ‘Upgrades’ tab
  6. From the drop down menu, select ‘Products.eduCommons:default’ and click Choose Profile button.
  7. Choose the ‘Migration :: 3.1.1 to 3.2.1’ option
  8. Press Upgrade

Delete old site and rename new site

To tidy up your Data.fs, do the following:

  1. Stop the new site
  2. Copy the Data.fs back to the old site:
    sudo cp -rvfp [new instance home]/var/filestorage/Data.fs [old instance home]/var/
  3. Start the old site
  4. Delete the instance with the id of ‘eduCommons’
  5. Stop the old site
  6. Copy the Data.fs to the new site
    sudo cp -rvfp [old instance home]/var/Data.fs [new instance home]/var/filestorage
  7. Start the new site
  8. If desired, rename your imported eduCommons321 site to eduCommons.

Repackage Course Downloads

You should now repackage the IMS Course Packages. This can be down via an External Method. If you have version 3.2.1, you will need to download this file from the source code https://educommons.com/svn/eduCommons32/enpraxis.educommons/trunk/enpraxis/educommons/extras/repackage_fss_courses.py

  1. Place the file in /instancehome/parts/instancename/Extensions
  2. Navigate to the roote of your eduCommons site in the ZMI
  3. Enter the following parameters:
    • Id: repackage_fss_courses
    • Title: repackage_fss_courses
    • Module Name: repackage_fss_courses
    • Function Name: repackage
  4. Click Add
  5. Click on the repackage_fss_courses script you just added
  6. Click the test tab.

Final Steps

Your site should now be migrated.

Dependent on how customized your 3.1.1 instance is, you should check for the following:

  1. If the style of the site is off (background images have ‘shifted’, for example), your custom CSS is likely conflicting with the default CSS in eduCommons 3.2.1
  2. If you have modified your safe_html portal_transform you may need to manually update the transform in the 3.2.1 instance
  3. Prior versions of Plone offer a linkintegrity feature that provides useful feedback if you delete an object that has been linked to. This feedback allows you to decide whether or not to delete the object, now knowing it has inbound links to it. Unfortunately, the feature also creates redirects to linked-to content that has been moved, without informing the user. This is problematic for eduCommons and reusing content, as the mappings for those redirects are not portable outside of Plone. To mitigate this, during the migration, we have programmatically rewritten any of these mapped links to the current location. To further standardize links, we suggest you perform the following conversion:
    1. Navigate to Site Setup
    2. Navigate to Visual Editor
    3. Click the Link tab
    4. For each of the following types in the select widget (Page, Folder, Folder), do the following:
      1. Click ‘relative path –> uid’

      2. Once the preview is generated, you can analyze the changes that will be made

      3. Once satisfied with the selection process press ‘Commit’.

      4. Now all links will be linked by uid, which will always render as a relative path to the actual location of the object.