diff -r 8c0c5400e770 -r e1cb9c606859 src/source/zodb.rst --- a/src/source/zodb.rst Mon Mar 05 10:40:40 2018 +0100 +++ b/src/source/zodb.rst Tue Mar 06 11:06:45 2018 +0100 @@ -148,3 +148,48 @@ Database creation is done as with RelStorage, but NewtDB add several schema objects. Migration scripts are available if you need to switch from a classic RelStorage database to a Newt database. + + +.. _ZODB.init: + +Initializing ZODB ++++++++++++++++++ + +When your ZODB is created, you have to initialize it! + +After installing PyAMS application (see :ref:`appinstall`), a database upgrade script is available which allows you +to initialize the database. See :ref:`config` and :ref:`scripts` to know more. + + +.. _ZODB.migration: + +ZODB migration +++++++++++++++ + +After installation, you can switch from a given storage to another one with the help of the *zodbconvert* command +line script provided by RelStorage. + +This Python script is using a configuration file containing directives of both source and target databases, which can +be any storage described in the previous sections (or can even use the same storage). + +Here is a sample configuration file to convert a ZODB from a ZEO to RelStorage: + +.. code-block:: + + %import relstorage + + + server zeo-server.mydomain:8100 + storage pyams + blob-dir /var/local/env/zeo/var/zeoclient/blobs + shared-blob-dir false + + + + keep-history false + blob-dir /var/local/env/pyams/var/relstorage/blobs + shared-blob-dir false + + dsn host='postgresql-server.mydomain' dbname='pyams_rs' user='pyams' password='xxxxxxxx' + +