How to Pack Zope Database

This step-by-step Plone Tutorial explains how to pack Data.fs Zope database file.

The following tutorial can be applied to Plone 4 or Plone 3 buildout-based instance.

Data.fs Zope database file includes all site content (var directory for traditional Zope instance and var/filestorage directory for buildout-based Zope intance). This file keeps the history of all transactions done on your site. Zope database can easily reach several gigabytes of data and become a problem over time, since your site will run slower and it will use lots of resources (memory) on the server. That is why it is recommended to pack Zope database regularly.

To pack the Zope database complete the following steps you have to login to your Zope installation as administrator and access Zope Management Interface on the top level. Navigate to Control_Panel:


Select Database Management item:


If you have a main and a temporary database you need to click main.


Then you need to enter the number of days that you wish to keep the history for (i.e. 1 or 2) and click Pack. At this point Zope will start packing the database for you. Depending on the size of your database, this might take quite a while. Apache might even timeout after a while and return an Internal Server Error. But don't worry: in the background, Zope will keep packing the database.


After a while you can check your Data.fs file and you will notice that it is considerably smaller (in our case, it went from 13.5 M to 8.2 M).


You can even restart your Zope process, which should make it run faster and use less resources.

Connect with our experts Let's talk