This package contains a function to restore lost objects from a ZODB backup. In the future, it might grow further tools for ZODB repair.
recover.restore_from_backup
The module recover defines the function restore_from_backup to restore lost objects from a ZODB backup. restore_from_backup has parameters lost, backup and target.
lost is an iterable of oids identifying objects lost in target. The oids might e.g. have been found by the standard fsrefs utility.
backup and target are open ZODB storages. backup is read only and can have been opened read only; target is read and written.
restore_from_backup reads the objects identified by the oids in lost from backup and writes them to target. If such a restored object contains references to other objects not available in target, they are restored recursively. The operations are logged via Python’s standard logging subsystem.
Example usage:
from logging import basicConfig, getLogger, INFO
from ZODB.FileStorage.FileStorage import FileStorage
from dm.zodb.repair.recover import restore_from_backup
basicConfig()
logger = getLogger(); logger.setLevel(INFO)
lost = [....] # list of oids for lost objects, e.g. derived from "fsrefs" output
backup = FileStorage('backup.fs', read_only=True)
target = FileStorage('target.fs')
restore_from_backup(lost, backup, target)
backup.close()
target.close()
Metadata
Release files for dm.zodb.repair 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dm.zodb.repair-1.0.tar.gz | 2.9 kB | Without provenance | Details for dm.zodb.repair-1.0.tar.gz |
Release files / dm.zodb.repair-1.0.tar.gz
| Download URL | dm.zodb.repair-1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0e3cf6496f63768d1f271cc86c16c47ec04ce1b3726ccfbb168cdeb6f8bbfcc
|
|
BLAKE2b-256 checksum How to use checksums |
e2739fcbb68352ecd1d6a820a3c87c3c9ba6fd4c10fee1e39e6c9c5f9c593a53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dm.zodb.repair 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.