Fixing a zope database with fsrecover.py
Tue, Oct 3, 2006,
200 Words
Due to hardware corruption I have a broken Data.fs that won't pack. To fix it the fsrecover.py script from the ZODB module can be used. For example, this is how to run the script to repair the broken database (I have zope installed in /opt/Zope2.8):
cd /opt/Zope2.8/lib/python/
python ZODB/fsrecover.py -v 1 /mnt/raid/Data.fs /mnt/raid/Data.fs.fixed
The reason to run the fsrecover script with ZODB in front is that it imports from the ZODB module. Normally the ZODB module wouldn't be in the python path, so using this trick solves this problem. The -v 1 argument makes fsrecover print the information on the current processed transaction.
Previous: Moving a Zope instance