Personal tools
You are here: Home Documentation How-tos Mounting portal_catalog in a separate ZODB
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Mounting portal_catalog in a separate ZODB

This How-to applies to: Any version.
This How-to is intended for: Server Administrators, Site Administrators

This how-to explains how to have the portal_catalog stored in an separate ZODB.

Rationale

Having the Portal catalog separated out from the main ZODB has the following advantages:

  • you can have different cache settings in the 'zope.conf' for your main content and for the portal cache
  • you can backup the portal catalog separately
  • being a separate file, the portal catalog ZODB file can be stored on a separate disk, giving an additional performance advantage.

Prerequisites

To get the most out of this HOWTO, you should be familar with the following concepts:

  • setting up a Plone Site
  • editing the 'zope.conf'
  • ZEO storages and ZODB mountpoints

You should read the mount-zeo-into-plonesite HOWTO

Preparation

We'll create a template database which we'll use later to mount things from into our root Plone Site.

  1. Create a new Zope Instance as you usually do (don't create a Plone Site yet)

  2. Edit the 'zope.conf' of the instance and add a new database. Note that I use "var_nobackup", so if you use the same config, create that directory.:

    <zodb_db empty>
        <filestorage>
          path $INSTANCE_HOME/var_nobackup/empty.fs
        </filestorage>
        mount-point /empty
    </zodb_db>
    
  3. Start up the zope instance. Inside the ZMI, add a "ZODB Mount Point" object. Check the "create missing folders..." checkbox and add the "empty" database.

  4. The "/empty" path should now be accessible within the ZMI. Inside that folder, add a new Plone Site. I'll name it "plone".

  5. Inside that Plone Site, add a new folder using plone, that is not iside the ZMI. I'll call that folder "content". That's where my segmented content will go (not part of this HOWTO)

  1. Shut down zope, and comment out the "empty" zodb_db section from your zope.conf.

The database in '$INSTANCE_HOME/var_nobackup/empty.fs' is now our template database we'll use from now on.

Removing the portal_catalog and using the one from the template database

Here we're going to setup a new Plone Site and configure it such that this instance will use the portal_catalog object from an separate database.

  1. Create a new Plone Instance the usual way. I'll name it "plone".

  2. Using the ZMI, delete the "portal_catalog" object from your Plone Site. Your Plone Site will no longer work, we'll fix that in a minute :)

  3. Shut down Zope.

  4. Copy the template database to your var directory. I'll name that one "catalog.fs".

  5. Add the following to your 'zope.conf':

    <zodb_db catalog>
        # CATALOG fs
        #container-class Products.ATContentTypes.content.folder.ATFolder
        mount-point /plone/portal_catalog:/empty/plone/portal_catalog
        <filestorage>
          path $INSTANCE_HOME/var/catalog.fs
        </filestorage>
    </zodb_db>
    
  6. Startup your Zope again.

  7. Using the ZMI, add a "Zodb Mount Point" inside your Plone Site. The "portal_catalog" database should be available. Dont forget to check "add missing folders...".

  8. Check that you now have a "portal_catalog" object visible in the ZMI.

  9. Using the ZMI, go to the portal_catalog's "advanced" tab and click "rebuild catalog".

see also:

Mounting content from one ZEO storage into an existing Plone site
If you want to have your plone site segmented into different folders that use different filestorages this is what you need to know. Splitting up your page accross different filestorages is also useful if you want to prevent one storage of becoming too big, backup them separately or use different cache-sizes (eg for catalogs)
by seletz — last modified March 7, 2007 - 06:00 All content is copyright Plone Foundation and the individual contributors.

broken mount-point "empty"

Posted by woutervh at February 18, 2008 - 17:50
It's not mentioned that you can delete the broken mount-point "empty" after restarting the instance.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by