Skip to main content

zope.app.fssync integration for Zope2

Project description

gocept.fssyncz2

Please note: We do no longer actively support this package. If you still need it, please drop us a note, we can either transfer the repository or support you on a paid basis.

This package provides Zope2 integration of zope.fssync/zope.app.fssync, that is, the ability to dump and restore ZODB content to the filesystem (To that end, it provides synchronisers for OFS folders and the like, and adapts the Zope3-ish mechanisms of zope.app.fssync to work with the Zope2 publisher).

Its main use case is to keep code stored inside the ZODB in a source code management system. Therefore, it tries to make the pickles that are written to disk as readable as possible (e. g. by not using base64 encoding).

So far, it concentrates on the dump and load actions (which overwrite their target completely), since merging changes between different checkouts needs to be done via the SCM anyway. (zope.app.fssync offers several other actions, such as update and commit, that try to be smart when both the ZODB and the filesystem dump have changed concurrently. While this is fine as long as only one filesystem representation exists, the model breaks down when several dumps need to be synchronized with each other – it is highly non-trivial to determine whose change really is the right one in that case, so we recommend against using these actions at this point.)

Usage

You’ll need to load both the configure.zcml and overrides.zcml configuration files.

gocept.fssyncz2 provides a console script called fssync which wraps the two actions (dump and load) and allows to pass in all other parameters (URLs, locations, credentials). This is meant to be generated (via buildout for example), like this:

[fssync]
recipe = zc.recipe.egg:scripts
eggs = gocept.fssyncz2
extra-paths = ${zope2:location}/lib/python
arguments = host='${instance:http-address}', folder='myfolder', credentials='${instance:user}', repository='${buildout:directory}/var/zodb-dump'

Then you can dump your ZODB to the configured filesystem location with bin/fssync dump and load the data stored on the filesystem into the ZODB with bin/fssync load.

Ignoring objects

If you want to exclude some objects from being dumped (e.g. user data that changes often), create a “Restrucured Text Document” named fssync-dump-ignore in the parent folder. This file may contain one object name per line that should be excluded from dumping.

Changes

1.7 (2018-09-19)

  • Fix restore of PluggableAuthService user folder.

  • Stabilised a test that depends on a file object’s etag to have a deterministic length. (#10491)

1.6 (2013-03-22)

  • Don’t dump the co_varnames attribute of PythonScripts as it is neither stable nor needed in the dump.

1.5.2 (2012-07-04)

  • Add workaround for CookieUserFolder to restore the __allow_groups__ pointer after load when fssync-ignoring it (#11111).

1.5.1 (2012-02-27)

  • Made ignore mechanism actually ignore objects on loading a dump. (#10488)

1.5 (2012-02-23)

  • Add ignore mechanism (#10483).

1.4 (2011-11-28)

  • Fixed a bug which prevented strings containing the sequence ]]> from being dumped and loaded back, giving rise to ill-formed XML pickles.

  • Cleaned up a little: removed an unused testdata directory.

1.3 (2011-08-05)

  • Pinned all used versions in buildout.

  • Added trove classifiers to package meta data.

1.2 (2011-04-10)

  • Made sure that newlines inside strings end up as newlines instead of \n notation in XML pickles (fixes #8860).

  • Install the fssync script in the development buildout.

  • When dumping a PythonScript, leave out its _code attribute to reduce noise in the XML pickles (fixes #8859).

  • Declared dependency on zope.i18nmessageid.

  • Better error message when finding persistent objects in Extras.`

1.1 (2011-01-31)

  • Renamed console commands to dump/load instead of checkout/checkin to avoid confusion with SCM operations.

1.0 (2011-01-31)

  • Initial release.

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

gocept.fssyncz2-1.7.tar.gz (18.2 kB view details)

Uploaded Source

File details

Details for the file gocept.fssyncz2-1.7.tar.gz.

File metadata

  • Download URL: gocept.fssyncz2-1.7.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.5.3

File hashes

Hashes for gocept.fssyncz2-1.7.tar.gz
Algorithm Hash digest
SHA256 4bb39088b9429905055bf0ffc6d937c52468a72f2055111a5ba28699f96e19eb
MD5 1d01cbf7862bbfe2359744813f149c2e
BLAKE2b-256 52b22b94619ade41c45b7434ef9833d96a3d33a222cadf8831bf38a445ce6a45

See more details on using hashes here.

Supported by

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