wiki:UserGuidelines/Admin/Synchronization

Version 9 (modified by Dominic König, 13 years ago) ( diff )

--

Synchronization

Purpose

Method

Overview

The synchronization process is controlled entirely from the local Sahana Eden instance.

The local Eden instance runs the scheduler process, and initiates the update requests when due, while the remote repository merely responds to these requests.

Synchronization Overview

The local Eden instance first downloads the available updates from the remote repository (pull) and imports them into the local database, and then uploads all available updates from the local database to the remote repository (push).

Both pull and push are each a RESTful HTTP-request, using S3XML as data format.

Configuration

Prerequisites ==

Both sites must have Sahana Eden installed and running.

To avoid problems with different database structures, both instances should always use the same version of the software.

Check that both instances have the synchronization module enabled in models/000_config.py. If the sync section is missing from deployment_settings.modules, then add it as follows:

deployment_settings.modules = OrderedDict([

    ...

    # Add or uncomment this section, if it is missing or commented:
    ("sync", Storage(
            name_nice = T("Synchronization"),
            description = T("Synchronization"),
            restricted = True,
            access = "|1|",     # Only Administrators can see this module in the default menu & access the controller
            module_type = 0     # This item is handled separately for the menu
        )),

    ...

])

Worker

The scheduled synchronization jobs are performed by a separate asynchronous web2py worker process at the local site.

To start the worker process, open a shell on the local server, change into the web2py home directory and run:

python web2py.py -K eden -Q

(replace "eden" with the name of your Sahana Eden application)

In more advanced configurations you may want to run this command as a daemon process, e.g. under Linux by:

nohup python web2py.py -K eden -Q >/dev/null 2>&1 &

...and/or implement a shell script to re-spawn the worker process automatically.


See S3/Synchronization See S3/Synchronization See S3/Synchronization See S3/Synchronization

Attachments (10)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.