Backing Up Your Plone Site


When dealing with any amount of data, obviously you should back it up regularly. But "regularly" is relative. If your site is going through very little content changes, there's no reason to back it up every night ”you could get away with backing it up weekly or even every two weeks. But for any site on which content changes frequently, it's typical to do a backup every night. Midnight is always a good time, unless your site is devoted to night owls and receives the majority of visitors at that time.

In addition to deciding when to back up your site, you need to decide what exactly needs to be backed up. Following are some options:

  • The Zope Object Database (ZODB) ” When performing a backup, this should be the absolute required item in the list. All of your Plone data is stored in the ZODB, in a file called Data.fs within the Data/Var directory in your Plone installation directory. Data.fs is the only file you need to back up; any other files, such as Data.fs.tmp or Data.fs.index , are variations of the file in different states and will be rebuilt (in the case of the index) or are temporary/swap (in the case of the .tmp file).

  • Log files ” Backing up the error logs and access logs is a good idea if you often analyze these logs for reporting purposes, or if you use these logs to monitor the goings-on in your server.

  • Plone files ” If you have made any custom modifications to the source code that runs Plone, be sure to back up these files as well. Otherwise, although you can reinstall Plone and use the backed-up Data.fs file, your customizations will be lost.

  • CMF and add-on product files ” Similarly to backing up Plone files, if you made any changes to the internals of the CMF or any of your Plone add-on products, be sure to back these up.

Before backing up the ZODB, you might want to pack it. Depending on your settings, packing the ZODB removes old objects and ensures that you're backing up only what you really need.

To perform packing, log into the Zope Management Interface and select the Control Panel link from the leftmost navigation frame. You should see a list of system administration information (such as uptime) and management functions ”links to items such as Database Management and so forth. Clicking the Database Management link produces links to all the databases available, usually main and temporary. Click the main link to display information and available actions for this database, as seen in Figure 8.5.

Figure 8.5. Database Management control panel.

A 28.0MB Data.fs file was packed to 5.8MB ”much more compact than its original size . You can customize the database packing by specifying a minimum age before objects are removed. If you specify that you want only items older than seven days old to be packed, that is what will occur. You still can undo any actions on objects modified within the last seven days, while freeing up whatever space you can.

In the next section, you'll learn about some of the different types of caching that can be done with Plone, to provide faster application response times.

Plone Content Management Essentials
Plone Content Management Essentials
ISBN: 0672326876
EAN: 2147483647
Year: 2003
Pages: 107
Authors: Julie Meloni © 2008-2017.
If you may any questions please contact us: