I've started playing with CMFSetup to improve importing and exporting the
configuration of a CPS site.

CMFSetup is a framework that describes the series of steps needed to setup a
CMF site, for instance "setup the actions tool", "setup the workflows", etc.
Each step is implemented by code that looks up the details of the
configuration in XML files. The CMF Setup Tool itself allows you to execute
steps individually (either in import or export mode), to make snapshots of
the existing state of a site, to compare them, to revert to any of them, and
of course to save the complete configuration to a file.

Yesterday I wrote some code to do the import/export for the directories
configuration. I'll do the same soon for schemas and layouts, and then for
the rest of the CPS tools. The goal is to be able to instanciate a CPS site
entirely through this mechanism, which means that all the configuration
would be in XML files.

Amon the remaining questions is, what to do about content, and what to do
about things that could be considered configuration but could also be
considered content. Instances of the latter are the content of directories
(ZODB directories for instance). For pure content stuff, I think a global
XML import/export (maybe optionaly retaining only the folder structure but
not the documents) can be done.

The advantage of using CMFSetup over CPSIO is that CMFSetup brings a very
rich framework for comparison and snapshots. One disadvantage of CMFSetup is
that parsing the XML files on import is largely ad-hoc, and painful to code.
Using a library like elementtree (like CPSIO does) would improve the process
a lot, so I'll play with that.

One nice thing in coding CMFSetup import/export handlers for CPS is that
CPSIO has already done this once, so all the code to introspect or recreate
objects can be reused, or at least used as an inspiration. Nevertheless it's
a lot of work that will have to be done piecewise.