Re: Finding missing blobs
Alessandro Pisa <[email protected]> Wed, 5 Dec 2018 14:35:06 +0100
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <CAFLUjzPVPJZkKfhDm3Nb+HszMBnBV=Z0VPgRmfPrT6M6d5j2MQ@mail.gmail.com> |
On Wed, 5 Dec 2018 at 14:07, Alessandro Pisa <[email protected]> wrote: > > Hello everybody, > I have a DB with missing blobs. > What is the proper way to scan all the blobs and report the missing ones? > For the moment I am checking https://pypi.org/project/zc.zodbdgc/ Running it on a DB where I removed on purpose on blob tells me: $ cat zeo.conf <zodb main> <blobstorage> blob-dir /path/to/blobs <filestorage> path /path/to/Data.fs </filestorage> </blobstorage> </zodb> $ ./bin/multi-zodb-check-refs zeo.conf !!! main 328146 ? POSKeyError: 'No blob file' Then I can check the blob with: $ fsoids Data.fs 328146 oid 0x0501d2 ZODB.blob.Blob 1 revision tid 0x03be0bafcbf1f8dd offset=15782912 2017-03-16 17:19:47.799657 tid user='' tid description='' new revision ZODB.blob.Blob at 15897728 referenced by 0x0501c9 plone.app.blob.field.BlobWrapper at 15846484 and get it from the connection (running a zope instance in debug mode): >>> from ZODB.utils import p64 >>> app._p_jar.get(p64(331142)) <ZODB.blob.Blob object at 0x7f3f79f91668> Is this the mainstream way? Any other tips for debugging? -- @ale_pisa - http://ale-rt.github.io - http://alepisa.blogspot.com - https://it.linkedin.com/in/apisa -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.