How to create database dumps to make installation easier when we want to put bahmni in production after testing and configuring it in my local machine ?

Hello Bahmni Community, i have a problem. I’ve downloaded and tested bahmni in my PC. I’ve made configurations to adapt Bahmni modules (OpenMRS and OpenERP) to our context. Now i want to deploy it in our server. How can i proceed ? Is there a method that allows me to export databases and just put it in the server and everything is ok ? (If yes, how do i proceed ?) or do i need to restart all configurations i’ve made for the test environment in the server for our production environment ? Ur help will be appreciated. Thanks

Moved to the #software:bahmni category.

Hello @soopafly,

You need to take back up of following things :

  1. Bahmni_config. For the taking Backup of Bahmni_config you need to navigate /var/www/ copy the bahmni_config to your local.

  2. Database Backup 2.1.Openmrs. 2.2.clinlims. 2.3.openerp You can use this command for taking backup : bahmni -i local db-backup (change the inventory file name (local) if you have changed to implementation based name) All Database Backup will be stored at /db-backup directory

Then you can follow the Bahmni wiki page Link

Hi @soopafly, You can use the database and configuration files in your production box from test environment. For this you need to have all the three database backups and copy of bahmni_config folder as @amol mentioned.

This command works till v0.87 Bahmni. If you are using latest Bahmni versions then you need to follow this wiki page. Let us know if you face any issues.

Hello everyone, I have tried to follow the guide you showed me. But i’m not able to perform backup on my system, and i don’t know why. i’ve used this command:

bahmni -i local backup --backup_type=db --options=openmrs

but it ends with an error. You can see it below

What can be the problem ? And Also, where are these backup files stored ? because there is no /db-backup folder in my file system.

Thanks!

Hi @soopafly,

When you run the above command the openmrs database dump gets saved in /data/openmrs/ folder. Looks like its a Unicode conversion issue with python 2.6 as mentioned here. Can you change the Language option in your machine to English and try.

Thanks @binduak the problem about Unicode is solved.

But it seems like for saves, in the /data/ folder, only dumps of openmrs and reports are saved there. where does the other applications dumps are saved ? it seems like for OpenERP it is in the /var/lib/pgbackrest/ folder. But for other apps like OpenElis i don’t know the path.

Thanks

Hi @soopafly,

This will backup only openmrs database. Please run the below command to take postgres (clinlims,openerp) backup and you can find the backup folder in /var/lib/pgbackrest/

bahmni -i local backup --backup_type=db --options=postgres

1 Like