DBSYNC UPGRADE QUICK GUIDE
Introduction
This document provides a
quick guide for upgrading the remote DBSYNC environment to version
1.6.9, which is compatible with the OpenMRS 2.3.x
platform.
For upgrades to the latest DBSYNC
1.9.0 version (compatible only with OpenMRS 2.6.x),
please refer to the OpenMRS Platform 2.6.11 Upgrade SOP,
released in March 2025.
If your system is already
running OpenMRS 2.6.11, please follow the instructions in the “Upgrade
Quick Guide 1.9.0.”
There are three upgrade
processes depending on your current DBSYNC environment:
1.
Online Docker installation
– Recommended for sites with a stable internet
connection.
2.
Native installation
– For environments not using Docker.
3.
Offline Docker installation
– For Docker environments with limited or
unreliable internet access.
Choose the appropriate
process based on your setup and follow the respective instructions carefully.
Before You Start
For all the environments you must perform below steps, and then
follow your specific environment steps:
Log
in as “eip” user.
Create
a temporary variable for eip home
export HOME_DIR=/home
export EIP_HOME=$HOME_DIR/eip
Change
current directory to eip home
If
you are running dbsync on Docker based installation, down the DBSYNC
container:
If
you are running DBSYNC on
non-Docker based [or native] installation, stop the DBSYNC service:
or
Create
a backup folder for old DBSYNC stuff:
sudo mkdir $HOME_DIR/eip_bkps
Change
the owner of the backup folder
sudo chown -R eip $HOME_DIR/eip_bkps
And
the owner of all stuff on eip home
sudo chown -R eip $EIP_HOME
Move
all older DBSYNC stuff to backup
folder. Run the two commands bellow on-by-one:
mv $EIP_HOME/*
$HOME_DIR/eip_bkps/
Create
the eip debezium dir
mkdir -p $EIP_HOME/shared/.debezium
Restore
the eip.env file from old stuff
cp
$HOME_DIR/eip_bkps/eip.env $EIP_HOME/
Restore
the debezium files from old stuff:
cp -R
$HOME_DIR/eip_bkps/shared/.debezium/* $EIP_HOME/shared/.debezium/
Edit
the $EIP_HOME/eip.env file removing the lines containing the following
properties if they are present:
dbsync_notification_email_smtp_auth_user=
dbsync_notification_email_smtp_user_pass=
dbsync_notification_email_smtp_host_name=
dbsync_notification_email_smtp_host_port=
system_user=
artemis_ssl_enabled=true
system_password=
Add
the below properties on the eiv.env file. These are credentials for the
DBSYNC console. You must use the username and password which appear on the
file $HOME_DIR/eip_bkps/release_stuff/dbsync-users.properties
From this
point follow your environment specific guide.
Upgrade process for Docker based environment (Online based
Installation
[1]
)
If your environment is an online
based installation running any
older version of DBSYNC follow the
below steps.
Make
sure you follow the instructions on the topic “Before You Start” and you are
under the $EIP_HOME directory.
Recreate the Docker repository
git init && git
checkout -b main
Add
remote Docker repository
Pull
the remote project into the local repository
git pull --depth=1 origin
main
Create
the container using the command bellow:
Follow
the container logs
docker logs --follow dbysync-remote
Wait until
the DBSYNC is started and then
if no error is reported, congratulations, You Are Done!
Upgrade process for Docker based environment (Off-line
based Installation
[2]
)
If you are upgrading any offline Docker based installation,
please follow the steps below.
Make
sure you follow the instructions on the topic “Before You Start” and you are
under the $EIP_HOME directory.
Remove the DBSYNC local docker image
docker image rm openmrs-eip-sender
Copy the DBSYNC package stuff (eip_home.tar.gz) to eip home dir
($EIP_HOME).
Uncompress the package file
using the command bellow:
Re-import the DBSYNC image to docker local
storage:
docker import docker_images/dbsync-remote.tar dbsync-remote:latest
Create the container using the
command bellow:
Follow the container logs
docker logs --follow dbsync-remote
Wait until the DBSYNC is started and then if no
error is reported, congratulations, You Are Done!
Upgrade process for Non Docker based environment
If your environment is non Docker based:
Make
sure you followed the instructions on the topic “Before You Start” and you are
under $EIP_HOME directory.
Remove
the old installation directory stuff
sudo rm
-
fr /home/openmrs-eip-docker/*
Now
enter the installation directory
cd /home/openmrs-eip-docker
Now,
recreate the repository
git init && git
checkout -b main
Add
remote Docker repository
Pull
the remote project into the local repository
git pull --depth=1 origin
main
Create
the eip debezium dir
mkdir
-
p
$EIP_HOME/shared/.debezium
Perform
the dependency installation using the command below:
sudo
/home/openmrs-eip-docker/release_stuff/scripts/apt_install.sh
Perform
the installation using the command below:
/home/openmrs-eip-docker/install.sh
Stop
the eip application
$EIP_HOME/scripts/eip_stop.sh
Reinstall
the eip service
sudo cp $EIP_HOME/scripts/eip.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable eip
Restart
the eip service
or
An online based installation
is the one done pulling the DBSYNC
stuff from the GitHub. In other hand there is offline installation which is
based on Docker images.
An off-line based installation
is the one done downloading the DBSYNC Docker images from the installation
package and manually install them on the host. The offline installation usually
is used on the remote sites where there is lack of internet connection.