This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

Introduction

collective.migrator is a buildout based tool to help migrate content between Plone/Zope instances. It can be installed as follows:

$ easy_install collective.migrator

Once installed you can run the tool to set up the migration environment

$ migrator

This creates a folder called migrator and installs a buildout environment there. All further actions are run from this folder.

The first thing that you want to do at this point is customize the instance.cfg file.

By default it looks like this:

[remote]
host = xxx.webfactional.com
user = ssh_user
port = 8080
extensions = /usr/Plone-2.5.5/zeocluster/client1/Extensions
zmi_user = admin
zmi_pwd = admin
root = Plone
export = /usr/Plone-2.5.5/zeocluster/client1/var

[local]
host = localhost
port = 8080
extensions = /home/suresh/plone4/parts/instance/Extensions
zmi_user = admin
zmi_pwd = admin
root = Plone
import = /home/suresh/plone4/var/instance/import

This defines the settings for all the Plone instances involved in the migration.

The buildout.cfg defines the steps that will be executed as part of the migration.

Here is the default content:

[buildout]
extends = instance.cfg
    migrate_frontpage.cfg
    migrate_users.cfg
    migrate_props.cfg
parts =
tbd =
    ${migrate_frontpage:parts}
    ${migrate_users:parts}
    ${migrate_props:parts}

As you can see, parts has been intentionally left blank. Also instance.cfg described previously is being used here. The other migrate_.cfg* files contain some sample steps to move various objects between the instances.

As a simple test, you can change parts in buildout.cfg to look like this:

parts = export_frontpage

This step is defined in migrate_frontpage.cfg.

Now after you run buildout as follows:

$ bin/buildout

you should notice that the front-page object has been exported in the remote Plone instance. Once you gain more confidence in the tool, you can even try to run the other steps found in the migrate_.cfg* files.

PS: This may not be the “coolest” way to manipulate your Plone and some of these actions may be better done with GenericSetup profiles, but this worked for me!

Troubleshooting

A couple of people have reported the following error:

# migrator
INFO: Starting migraton.
Traceback (most recent call last):
  File "/opt/python/bin/migrator", line 5, in ?
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Not sure what causes this, but I suspect a flawed python installation. virtualenv is a good tool to protect against this situation. The following modified installation procedure can be used in this case:

$ easy_install virtualenv
$ virtualenv --no-site-packages <my-folder>
$ . <my-folder>/bin/activate
$ easy_install -U setuptools
$ easy_install -U zc.buildout
$ easy_install collective.migrator
$ migrator

Changelog

1.8 (2012-02-22)

  • Nothing changed yet.

1.7 (2012-02-22)

  • Nothing changed yet.

1.6 (2012-02-22)

  • Allow zmi username/password to be furnished from file as created by UnifiedInstaller [sureshvv]
  • No install_requires [sureshvv]
  • Check existence before deleting objects in ZODB [sureshvv]

1.5 (2011-02-26)

  • Recipe to generate .objects, .preserve and .properties to facilitate importing content [sureshvv]
  • Display error message from error log if import fails [sureshvv]
  • Enable/Disable link check integrity [sureshvv]
  • Allow url quoting in filenames for copy_file for allowing blanks etc. [sureshvv]
  • Allow bad characters in filenames, like ~, (, ) etc. [sureshvv]
  • Add tests [sureshvv]

1.4 (2010-11-27)

  • Added pack_db recipe [sureshvv]
  • enable_link_integrity_checks can be toggled [sureshvv]
  • bug fix in export [sureshvv]
  • Troubleshooting section in README.txt [sureshvv]
  • put back install_requires. Too many problems in the wild. [sureshvv]

1.3 (2010-10-25)

  • Removed migrate_blogs reference (Thanks to Marcelo Zabaljauregui) [sureshvv]

1.2 (2010-08-11)

  • dump error log on failures [sureshvv]
  • No install_requires [sureshvv]
  • Allow looping for external method [sureshvv]
  • New recipe to post to a url [sureshvv]
  • New scripts for action, site config [sureshvv]
  • Remove zexp file after import [sureshvv]

1.1 (2010-06-17)

  • Allow arguments to be passed to external methods [sureshvv]
  • Split scripts into cohesive units [sureshvv]
  • Added documentation in README.txt [sureshvv]

1.0 (2010-06-16)

  • Initial release [sureshvv]
Release History

Release History

1.8

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
collective.migrator-1.8.tar.gz (19.3 kB) Copy SHA256 Checksum SHA256 Source Feb 22, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting