Forum OpenACS Development: Cloning ACS

Collapse
Posted by Peter Alberer on

During the last days i have started to create a package that provides import/export of openacs-data to/from xml files. My goals for the first version were to provide xml-support for users (+attributes), groups (+types), relationships (+types), roles, sitemap data (+permissions+parameters).

The first version seems to work quite OK and so i thought maybe others are interested in this effort as well. A tgz file can be downloaded here. It uses xotcl and tdom for xml support.

Of course some things are missing (relational segments) and some will probably not work (eg. attributes for groups). Not all details are exported, just enough to recreate the items. creation_date and creation_user for example are not exported.

In addition to that i am not sure whether all items are recreated corretly. Example: As far as groups are concerned i am not quite sure how to deal with groups that have a context_id that is not a package-instance.

So a lot of work remains to be done, but some things work already.

Collapse
2: Re: Cloning ACS (response to 1)
Posted by Jeff Davis on
This will only work if the xml file fits in memory though right?  What if you want to clone something (like the content repository) where the contents are too large for memory.  Is there any provision for streaming the output to a file rather than creating it in memory first?
Collapse
3: Re: Cloning ACS (response to 2)
Posted by Peter Alberer on

The code is not meant to clone db-structures, or install packages, it only deals with data. Currently the code does not deal with the CR but i have started to create instance-data handlers for the page and lars-blogger package, that allow to export package-instance data as well.

The export process creates several xml-files for users,groups etc. (downloadable via a zip file). It also creates individual xml-files for different package-instances. The CR should not be exported in one file, but as part of a package-instance.

For example, if the news package (that uses CR) is mounted under /news and /news2 the export should create different xml-files for those. And of course the info could be split over several xml-files per package-instance (eg. one for every 1000 items).

btw, i have successfully transfered 7000 users, groups and relationships between two server that way a few hours ago :)