How do I copy/migrate all the Bahmni setup done on one machine to another machine?

A question I did have was if we are happy with the setup and configuration on the virtual machine are we able to easily migrate that onto another server?

With regards to the setup/configuration, the answer is Yes. You can setup Bahmni properly on one machine, and then “export” it to other machines. For that, there are two things to be done:

a) Databases: For that we just backup databases from one machine, and restore them on the other machine. Steps mentioned here:

b) Configuration: Any UI changes to Bahmni are done through the config files in /var/www/bahmni_config folder (as mentioned in the Implementers Guide). You will need to copy over this folder to the new machine, so that all the settings are also exported to the new machine. Usually, this folder is “backed” up in github. For instance see these:✓&query=config (all folders that end with “config” in github are some implementations configuration file repositories that they restore as /var/www/bahmni_config).

Still this is recommended to copy one instance from one machine to another?

@munnavhai, If you worked inside a vagrant box then you can repackage your changes and copy the box file to new machine. I guess this is the simplest way for migration the changes.

– Create a new .box. This will create a file

vagrant package

You will find more instructions in this link

1 Like

@sohel vi

I am trying to migrate bahmni (endTB) installed in the physical machine (Production) to another one. I followed the steps suggested by @gsluthra but having the following error in clinical app,

I have checked the concept dictionary which is exactly same as the production machine.

Did you try going to openmrs admin console and rebuilding the “search index”?

Hi @angshuonline

Yes I have tried this as well but still having the same issue.

@munnavhai according to your screen shot it seems config directory is not found , can you please enter into /var/www and check for this soft link,

bahmni_config -> /bahmni/implemenation-config

In Openmrs concept dictionary, try searching for concept “Baseline, Registration number of past TB treatment”.

The only reason such an error would be displayed if a concept with the specified FSN is not found.

1 Like

Hi @angshuonline

I have checked the concept dictionary and its there. This error is happening while loading all the other obs form as well.

Hi @sohel vi,

yes the softlinks are done still the same issue

  • lrwxrwxrwx. 1 bahmni bahmni 31 Jul 19 12:29 bahmniapps -> /opt/bahmni-web/etc/bahmniapps/
  • lrwxrwxrwx. 1 root root 33 Jul 23 11:58 bahmni_config -> /opt/bahmni-web/etc/endtb_config/
  • drwxr-xr-x. 2 bahmni bahmni 4096 Jul 19 11:32 bahmni_revisions
  • drwxr-xr-x. 2 root root 4096 Jul 19 12:29 cgi-bin
  • lrwxrwxrwx. 1 bahmni bahmni 40 Jul 19 12:29 client_side_logging -> /opt/bahmni-web/etc/client_side_logging/
  • drwxr-xr-x. 3 root root 4096 Jul 19 11:07 error
  • drwxr-xr-x. 2 root root 4096 Jul 23 11:13 html
  • drwxr-xr-x. 3 root root 4096 Jul 19 11:07 icons

@munnavhai I am not sure about the exact reason but can you please change ownership of config directory,

change ownership of directory from root to bahmni user.

lrwxrwxrwx. 1 root root 33 Jul 23 11:58 bahmni_config -> /opt/bahmni-web/etc/endtb_config/


Tried but still no luck

@munnavhai can you please check in “/etc/bahmni-installer/setup.yml” whether you put proper implementation name? also if you change installation variable you need to run installation again. I presume you already done these if not just recheck.


Yah i have checked all of these. I haven’t changed any env variable after the installation.

also a typical installation soft link should look like following ,

lrwxrwxrwx 1 bahmni bahmni 22 2018-07-13 07:18 bahmni_config -> /bahmni/default-config i can see an extra slash in yours.

Hello, Thank you for your solution track which helped us a lot. Indeed, I saved the openmrs database of bahmni on which I had done some translations. Then I restored this openmrs database in another machine running bahmni. The synchronization between openmrs and OpenElis works normally. However we have a data synchronization problem between Openmrs and OpenErp. Like OpenElis I emptied the markers and failed_events but the data added in the openmrs still do not appear in the OpenErp. How can we solve this problem? Thank you for your help.

@munnavhai are you done with this issue ?