You are here: Home Articles Plone: Kapil does it again -- enter contentmirror

Plone: Kapil does it again -- enter contentmirror

Transparent serializing of Plone content to relational DBs. NOT using pickles. Very easy to integrate, and very flexible, as it seems.

What?

I came around today reading this post on Plantet Plone. I've tried it just now. I'm blown away.

It's easy to install and use!

  • read up the installation manual here

  • create a plone 3 buildout with paster

  • add 0.4.1 of ContentMirror to the buildout

  • copy the pre-made example configuration

  • read up on SA DB URI formats here yielding in:

    <!-- setup a database connection -->
    <db:engine url="sqlite:////tmp/plone.db"
              name="mirror-db"
              echo="True"/>
    
  • create the db schema mirror.sql using a script:

    ./bin/instance run parts/productdistros/ContentMirror/ddl.py sqlite > mirror.sql
    
  • create the db using:

    sqlite3 /tmp/plone.db < mirror.sql
    
  • fire up zope, install a plone instance

You get all your content you create, modify etc. mirrored in very nice SQlite tables.

Why is this great?

  • create content in Plone, but serve it using a dead-simple and fast PHP site (Yes!)
  • Access the database and run various reports and queries using standard tools which do not need to touch the ZODB at all
  • Have a standard way to access your content, to ease migration

btw, yes I know the reST rendering sucks.

vim:ft=rst:sw=2:ts=2:expandtab:
Document Actions