February 15, 2010

Checking your ZODB storages for PosKey errors

Here is the blueprint...

  • create a virtualenv environment for Python 2.6
  • install zc.zodbdgc:
bin/easy_install zc.zodbdgc
  • create a copy of the storage file (your Data.fs)
  • create a configuration file in.cfg for this storage:
<zodb 1>
  <filestorage main>
      path /path/to/Data_copied.fs
  </filestorage>
</zodb> 
  • run the check (the script will give you some reasonable output possible Poskey error if there are any. For a consistent storage there won't be any output):
bin/multi-zodb-check-refs in.cfg