= Content Migration from Plone 3 to Plone 4 = [[PageOutline]] The following example demonstrates the process of content migration from Plone 3.2.3 to Plone 4.0 instance (both Plone 3.2.3 and Plone 4.0 are buildout-based instances). To migrate content from Plone 3 website to Plone 4 you have to complete the following steps: == Content EXPORT from old Plone 3.2.3 instance == We have a Plone 3.2.3 site containing several folders with different content items within that we want to migrate to a brand new Plone 4 site. [[Image(plone3.png, nolink)]] 1. Add '''quintagroup.transmogrifier''' to Plone 3 instance buildout, re-run buildout and restart instance (see [wiki:/quintagroup.transmogrifier/plone3-4#Installationonbuildout detailed installation instructions] below). 2. Install '''Marshall''' and '''quintagroup.transmogrifier''' products in Pone (Site Setup -> Add-on Products). [[Image(plone3-addons.png, nolink)]] 3. You should now have '''Content migration''' item appeared under ''Add-on Product configuration''. [[Image(plone3-config.png, nolink)]] Here you can configure export configuration if needed (see [wiki:quintagroup.transmogrifier/plone3-4#Exportimportconfiguration Export/import configuration] below). [[Image(plone3-config1.png, nolink)]] 4. Go to Zope Management Interface and in '''portal_setup -> Export''' tab check '''Content (transmogrifier)''' step: [[Image(plone3-porltal-setup.png, nolink)]] Perform '''Export selected steps''' by hitting the corresponding button at the bottom of a page: [[Image(plone3-export-steps.png, nolink)]] Archive file with exported content will be returned to you. Save it somewhere. [[Image(plone3-export-save.png, nolink)]] This is all you need to do on the old Plone 3 instance. Now it's time to open your new Plone 4 site. == Content IMPORT to new Plone 4.0 instance == We have a brand-new Plone 4.0 site containing no custom content, only the ones that come with default Plone creation. [[Image(plone4.png, nolink)]] 1. Add '''quintagroup.transmogrifier''' to Plone 4 instance buildout, re-run buildout and restart instance (see [wiki:/quintagroup.transmogrifier/plone3-4#Installationonbuildout detailed installation instructions] below). 2. Install '''Marshall''' and '''quintagroup.transmogrifier''' products in Plone (Site Setup -> Add-on Products). [[Image(plone4-addons.png, nolink)]] 3. You should now have '''Content migration''' item appeared under ''Add-on configuration''. [[Image(plone4-config.png, nolink)]] Here you can configure export configuration if needed (see [wiki:quintagroup.transmogrifier/plone3-4#Exportimportconfiguration Export/import configuration] below). [[Image(plone4-config1.png, nolink)]] 4. Go to Zope Management Interface and navigate to '''portal_setup -> Import''' tab: [[Image(plone4-portal-setup.png, nolink)]] Use '''Browse...''' button to point to archive file with exported content (at button at the bottom of a page): [[Image(plone4-browse.png, nolink)]] Import content by hitting '''Import uploaded tarball''' button: [[Image(plone4-import-tarball.png, nolink)]] Now content from Plone 3 site is available on Plone 4 site: [[Image(plone4-imported.png, nolink)]] CONGRATULATIONS! You've just migrated content between different Plone sites. = Installation on buildout = You have to install quintagroup.transmogrifier to both instances. So, complete the following steps on both instances buildouts. * Add quintagroup.transmogrifier to eggs section and to the ZCML area of buildout.cfg file in the root of your instance: {{{ [instance] .... eggs = .... quintagroup.transmogrifier recipe = ... ... zcml = quintagroup.transmogrifier }}} * Re-run buildout with: {{{ $ ./bin/buildout }}} * Restart the Zope server with the following command in the terminal: {{{ $ ./bin/instance restart }}} * Activate '''quintagroup.transmogrifier''' via Quickinstaller in Plone: Site Setup -> Add-ons. If everything is OK - a new '''Content migration''' item should appear in the ''Add-on products configuration'' control panel. = Export/import configuration = Default configuration of Quintagroup transmogrifier product is prepared to migrate site with archetypes-based content types, with standard archetype fields, properties and workflows. Site with specific content types or archetype fields needs customization of export/import configuration. '''Content migration''' configlet has export and import configurations, which is used by transmogrifier. Look to collective.transmogrifier documentation to get into pipeline, blueprints and other transmogrifier-related stuff. If you need - you can write your own blueprints, and register a desired utility which will perform import/export of some special stuff from objects. Then you may use created blueprint(s) in export/import configurations of the configlet. The default configuration is registered in ZCML and it's initially displayed in the form. If you click 'Save' button for the first time it will be persisted in database and will override the default configuration. To switch back to default configuration simply leave blank input area and click 'Save'. = IMPORTANT NOTE = For importing/exporting content you have to use Python with '''libxml2''' library support or '''Products.Marshall >=1.2.1'''. The requirement comes from quintagroup.transmogrifier using atxml namespace, while Products.Marshall <1.2.1 requires libxml2 library to register that namespace.