How to Backup Data.fs and Plone Products

This Plone tutorial is helpful for those Quintagroup's clients who want to backup their Plone site: ZODB database and Plone Products.

The following tutorial applies to Plone 3 and Plone 2.

Backup refers to making copies of all data available on your Plone site, so that these additional copies might be used when restoring the original after certain data-loss event. When working with Plone site, you should backup all content of your site, stored in your Data.fs file. This file includes the entire database, usually referred to as the Zope Object DataBase (ZODB). It is normally located in var directory of your Zope instance, and can be backed up by doing a simple copy.

So, how to back up the entire database?

First of all SSH to your Zope instance, open Var directory, where Data.fs file is located:
data.fs.png
Now backup this Data.fs file in one of the following ways:

  1. Without shutting down your site, simply copy Data.fs file. But this copy might be inaccurate since you site remains live and some processes are constantly taking place.
  2. Stop/shutdown Zope, copy Data.fs and restart Zope. This is the simplest and easiest way to safely backup the database, but the disadvantage here is that your site will be down for some time.
  3. Without shutting down your site, pack the database in ZMI. This creates Data.fs.old with the previous contents of the database. Since Plone does not write to that file anymore after packing, it's safe to backup this file after packing while Plone remains running. Be sure to backup both Data.fs.old and Data.fs.
    data.fs.old

When doing backups, Data.fs is really the only critical file, but you may want to back up your Plone Products (Products directory of your Zope instance) too, to make sure you have the correct versions of them. This will help you to restore your Plone site during the fresh Plone Installation. To backup your products - simply copy Products directory of your Zope instance and that's it.

products

Connect with our experts Let's talk