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:
- 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.)
- 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:
- Pre-migration of Data.fs in version 3.1.1-final
- Movement of Data.fs file to a new 3.2.1-final instance
- Migration to the eduCommons 3.2.1-final instance
- Delete Old site and rename new site
- Repackage Course Downloads
- 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:
- Download the product from the aforementioned URL (http://pypi.python.org/packages/source/P/Products.contentmigration/Products.contentmigration-1.1.zip)
- 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. -
Restart zope
Run the migration script by following these steps:
- Open your 3.1.1-final eduCommons site in the ZMI. (click educommons Setup, then click Zope Management Interface.)
- From the drop down menu, select “External method” and click the Add button.
- Enter the following parameters:
- Id: PreMigrate
- Title: PreMigrate
- Module Name: PreMigrate
- Function Name: pre_migrate_3_1_1_to_3_2_1
- Click Add
- Click on the PreMigrate script you just added
- Click the test tab.
- Verify that the method ran successfully. (It should give you feedback.)
- 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:
- 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
- Navigate to the root of your ZMI instance and create a new eduCommons site called eduCommons321
- Open your new 3.2.1-final eduCommons site in the ZMI. (click educommons Setup, then click Zope Management Interface.)
- Navigate to portal_setup
- Press the ‘Upgrades’ tab
- From the drop down menu, select ‘Products.eduCommons:default’ and click Choose Profile button.
- Choose the ‘Migration :: 3.1.1 to 3.2.1’ option
- Press Upgrade
Delete old site and rename new site
To tidy up your Data.fs, do the following:
- Stop the new site
- Copy the Data.fs back to the old site:
sudo cp -rvfp [new instance home]/var/filestorage/Data.fs [old instance home]/var/
- Start the old site
- Delete the instance with the id of ‘eduCommons’
- Stop the old site
- Copy the Data.fs to the new site
sudo cp -rvfp [old instance home]/var/Data.fs [new instance home]/var/filestorage
- Start the new site
- 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
- Place the file in /instancehome/parts/instancename/Extensions
- Navigate to the roote of your eduCommons site in the ZMI
- Enter the following parameters:
- Id: repackage_fss_courses
- Title: repackage_fss_courses
- Module Name: repackage_fss_courses
- Function Name: repackage
- Click Add
- Click on the repackage_fss_courses script you just added
- 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:
- 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
- If you have modified your safe_html portal_transform you may need to manually update the transform in the 3.2.1 instance
- 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:
- Navigate to Site Setup
- Navigate to Visual Editor
- Click the Link tab
- For each of the following types in the select widget (Page, Folder, Folder), do the following:
-
Click ‘relative path –> uid’
-
Once the preview is generated, you can analyze the changes that will be made
-
Once satisfied with the selection process press ‘Commit’.
-
Now all links will be linked by uid, which will always render as a relative path to the actual location of the object.
-