Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

If the server is not the root node, then you have to define the parent server and set this server's database to be an exact copy from the parent.

Step One

  • Install the openmrs webapp with any simple database (the database will be overwritten in a later step with a copy of the parent's db)
  • Install the sync module and all modules installed on the child server

Step Two

  1. Go to the configuration page and click the Define the Parent Server link. (This link disappears once the parent server is set up and listed in the server's section as "PARENT")
  2. Choose a nickname for the server (does not have to match the nickname defined on the actual parent server)
  3. Get the UUID from the PARENT server's config current server page.
  4. (optional) Put in the url / ip address of the parent server.
  5. Enter the username/password of an existing user on the parent server to authenticate as when sending data
    • Use the same username/password that was created during setup of this child server on the parent server
    • Note: This step is optional if you are always doing a "File Sync" and never doin ga "web sync". (See synchronization modes)
  6. If you choose "Sync automatically", then a scheduled task is created that synchronizes via the web every x minutes (you choose x). We recommend a value between 3 and 10 minutes depending on your server data volume.
    • If you don't sync automatically, you will need to manually trigger the sync'ing. See the configuration page
    • Note: This step is optional if you are always doing a "File Sync" and never doing a "web sync". (See synchronization modes)
  7. You can decide which java objects to NOT send to the parent server. By default all compatible OpenmrsObject classes are sent except for global properties.
  8. Save the parent server settings

Step Three

It is imperative that the databases match exactly as close to the child creation time on the parent server as possible. In particular though, the UUID columns on all the tables on the parent and child have to match, otherwise very bad things happen.

A box will appear for "Parent server data replication" after saving the parent server.

Option 1: direct network connection
If you have a direct network connection, choose "Clone parent data via web" to zip the parent server data, receive it over the web, and overwrite the entire child server database (apart from the sync settings)

Option 2: no network connection between servers
If you don't have a direct network connection, you can generate and transfer the file manually. See the child server setup page to download the zip and use the "Upload parent data backup file" option on the child

Option 3: direct database copy
It is possible to copy the mysql database files and paste them into the child server's files.  HOWEVER, this will overwrite the setup you did in the previous step! You will need to redo that. (but it is much faster to do it this way if you have a large database)

If you want to remove the parent server (aka make the current server a root node), you currently have to do it manually. Go into the "sync_server" table and find the appropriate row and delete it. See also SYNC-66@jira

(Back to Sync Module home page)

  • No labels