Skip to main content

Check if all data from a ZODB can be loaded

Project description

Overview

Verify a ZODB by iterating and loading all records. Problems are reported in detail. A debugger is provided, together with decompilation information.

zodbverify is available as a standalone script and as addon for plone.recipe.zope2instance.

Usage

Script

The verification runs on a plain ZODB file. The Zope application is not started.

Run i.e.:

bin/zodbverify -f var/filestorage/Data.fs

Usage:

zodbverify [-h] -f ZODBFILE [-D] [-o OID]

Verifies that all records in the database can be loaded.

optional arguments:
  -h, --help            show this help message and exit
  -f ZODBFILE, --zodbfile ZODBFILE
                        Path to file-storage
  -D, --debug           pause to debug broken pickles
  -o OID, --oid OID     oid to inspect

plone.recipe.zope2instance integration

The verification runs in the context of the initialized Zope application.

Usage:

./bin/instance zodbverify [-h] [-D] [-o OID]

Verifies that all records in the database can be loaded.

optional arguments:
  -h, --help         show this help message and exit
  -D, --debug        pause to debug broken pickles
  -o OID, --oid OID  oid to inspect

Inspecting a single oid

The output of zodbverify gives you a list of all problems and the oid that are affected.

To inspect a single oid in detail you can pass one of these to zodbverify:

./bin/instance zodbverify -o 0x2e929f

This will output the pickle and the errot for that oid.

By also adding the debug-switch you will get two pdb’s while the script runs:

./bin/instance zodbverify -o 0x2e929f -D

2020-03-11 10:40:24,972 INFO    [Zope:45][MainThread] Ready to handle requests
The object is 'obj'
The Zope instance is 'app'
[4] > /Users/pbauer/workspace/dipf-intranet/src-mrd/zodbverify/src/zodbverify/verify_oid.py(52)verify_oid()
-> pickle, state = storage.load(oid)

In the first pdb you have the object for the oid as obj and the zope instance as app. Before the second pdb the pickle will be disassembled the same way as when using zodbverify to pause to debug broken pickles without passing a oid.

Source Code

Contributors please read the document Process for Plone core’s development

Sources are at the Plone code repository hosted at Github.

Changelog

1.1.0 (2020-04-22)

New features:

  • Show the affected oids for each error. Inspect a single oid. The idea is to run zodbverify on the whole database and from the output copy one oid and run it again to further inspect that object. [pbauer] (#6)

Bug fixes:

  • Minor packaging updates. (#1)

1.0.2 (2019-08-08)

Bug fixes:

  • Open Data.fs in read only mode. (#2)

1.0.1 (2019-05-09)

Bug fixes:

  • Fix project description. [jensens] (#1)

1.0 (2019-05-09)

New features:

  • Initial effort. Base code taken from Products.CMFPlone (created by @davisagli). Enhanced and packaged for more general Zope use. [dwt,jensens] (#1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zodbverify-1.1.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zodbverify-1.1.0-py2.py3-none-any.whl (13.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file zodbverify-1.1.0.tar.gz.

File metadata

  • Download URL: zodbverify-1.1.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for zodbverify-1.1.0.tar.gz
Algorithm Hash digest
SHA256 0a6e00b62fbe23ede33ff387c2343a61a76987266e2ed5081c9e81d85fc61363
MD5 1dbcd3e378af42fafdb8d41d8c982763
BLAKE2b-256 9be05cd320045b88f136bbfbe751f98d8c653a72f377ed5199c6861ff58db1ba

See more details on using hashes here.

File details

Details for the file zodbverify-1.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: zodbverify-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for zodbverify-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 207d674d2ea724a1105c997f4204de5bf1560c07e947d60b1c95d613619ef0b8
MD5 ff64c35d28cbd1ab3b592ec0edf3866a
BLAKE2b-256 bdd371563f62a333eff2870baf677b56b59e91f7d3a9423baadd4bd5d8e3cc1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page