Warning

This document hasn't been checked for compatibility with current versions of Plone. Use at your own risk.

Using the Zope Undo system to "roll back"

by David Bain last modified Dec 30, 2008 03:03 PM
"undelete" or "roll back" information in a plone site using the Zope Undo system.

Overview

Zope has a built in undo system which tracks all the changes made to the ZODB. This system can be accessed via the ZMI and is a useful emergency measure to restore a site to an older state after something undesirable has been done to it. This is most relevant if you have NOT been keeping regular backups using repozo.py.
If you have been keeping regular backups it is possible to restore from the filesystem based backup.

Let's do this

1. Go to the Undo Form

Log in as a Manager and navigate to the undo form from 'site setup' > 'Zope Management Interface' > 'Undo' or go directly to the URL {your-plone-site}/manage_UndoForm. By default this displays the last 20 actions performed to the site (they're referred to as transactions).

2. Then Undo

Check the boxes of the transactions that you need to undo. It is sometimes necessary to undo several transactions as a group, if a transaction depends on another transaction the undo may not work successfully.

If you need to undo more than 20 transactions in one go: It is possible to manually enter a URL that will show more than 20 transactions on a single page, the URL below demonstrates how to
get the last 300 transactions to show on a single page (adjust the numbers according to your needs):
{your-plone_site}/manage_UndoForm?first_transaction:int=0&last_transaction:int=300&PrincipiaUndoBatchSize:int=300

Setup a proper backup system

Hopefully you were able to undo the problems and restore you plone site to something useful. This is a good time to learn a better way to do backup and restore.


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.