How to Backup Data.fs 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:
Now backup this Data.fs file in one of the following ways:
- 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.
- 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.
- 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.
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.