BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

Upgrade to Latest Bahmni Release

Purpose

This page guides with the steps to upgrade the system to latest bahmni version once the fresh installation is done as mentioned in the관련 문서: Install and Setup

Steps to upgrade

Choose the version of bahmni

One has to identify the version to upgrade the system to.

Update the existing installer rpm

The bahmni-installer rpm is responsible for fetching the required rpm's for bahmni installation. Since the use case is to upgrade to latest version of bahmni, the existing bahmni-installer rpm should be updated. Follow the code snippet below

How to update bahmni-installer rpm ?
sudo yum remove bahmni-installer
sudo yum install -y https://dl.bintray.com/bahmni/rpm/rpms/bahmni-installer-0.91-89.noarch.rpm

Backup

It is a best practice to take backup data, files and any other local changes done (e.g. app config) in the system.

Backup Data and Files

One can use backups command that bahmni by default provides to backup the databases/files etc. For a comprehensive list of backup commands please see the documentation here. Also ensure that bahmni backup-restore configuration are setup properly in file: /etc/bahmni-backrest.conf관련 문서: Backup/Restore commands

App Config

Please take a backup of your implementation specific config folders.

How to backup config ?
cp /var/www/bahmni_config ~/bahmni_config_backup

Run Installation

Upgrade to Bahmni 0.92

While the above process worked for previous version of Bahmni (0.91 or earlier), upgrading to Bahmni 0.92 will require additional steps, since the OS itself has changed from CentOS 6.x to 7.x. There is no automated tools to do so, & Redhat upgrade tool is no longer available or supported, unless you get an archived version from somewhere. There are unofficial writeup about manual upgradation process from version 6 to 7, but we wouldn't recommend it, unless you know what you are doing!

In the following sections we describe what would the process for you to migrate from earlier version of Bahmni (0.91 or earlier) to latest 0.92.

We would recommend

  • installing on a new machine with CentOS 7.6 64 bit version installed. 
  • or re-purposing your existing machine / env.  

Before you start, proceed with caution

  • backup your data and files to an external drive (USB, File System on another machine, Network storage etc) 
  • try out first on a test env before proceeding on the production env

The artefacts that are to be backed up are:

  1. MySQL databases: Component relevant (openmrs, bahmni_reports etc)
  2. Postgres databases: Component relevant (bahmni_pacs, clinlims, odoo, pacsdb etc)
  3. Patient images: from Bahmni Clinical / OpenMRS
  4. Document images: from Bahmni Clinical / OpenMRS
  5. Uploaded files: from Bahmni Clinical / OpenMRS
  6. Uploaded lab results: from Bahmni Clinical / OpenMRS
  7. PACS images: from Bahmni Clinical / OpenMRS
  8. Report module generated files by Queue feature: from Bahmni reports 

Below we explain 2 approaches for upgrades. Note, in both the approaches, the OpenERP database restoration will not work.

Manual

Assuming, that you have a new env where you have just installed "bahmni-installer" and not yet run the "bahmni install" command yet.

From the old env, you need to copy the databases and files/directories and restore them on new env.

Restore databases

  • First take backup of databases from old env
MySQL DB Backup
$ mysqldump --routines -u root -p openmrs > openmrs_backup.sql
$ mysqldump --routines -u root -p bahmni_reports > bahmni_reports_backup.sql
Postgres DB backup
$ psql clinlims > openelis_backup.sql
$ psql bahmni_pacs > bahmni_pacs_backup.sql
$ psql pacsdb > pacsdb_backup.sql
  • Copy these databases to the new env. Some of the databases can be auto imported during installationYou can drop "openmrs_backup.sql" and "openelis_backup.sql" in /etc/bahmni-installer/deployment-artifacts
  • bahmni -i <your inventory file> install
Restore db
$ mysql -u[user] -p[password] bahmni_reports < bahmni_reports_backup.sql
$ psql bahmni_pacs < bahmni_pacs_backup.sql
$ psql pacsdb < pacsdb_backup.sql

Restore files/directories

  • Copy the following directories and files within from old env. The following are the default locations for files
/home/bahmni/patient_images
/home/bahmni/document_images
/home/bahmni/uploaded-files
/home/bahmni/uploaded_results
/home/bahmni/pacs_images
/home/bahmni/reports
  • On new env, you can restore the files exactly in the same locations&nbsp;

Restart your services, and test out (don't forget to rebuild index on OpenMRS first)

Using bahmni backup and restore

Alternatively, you can use Bahmni backup command to take a backup of all artefacts, and copy them to the new env and run restore command.

To do this, first up - install Bahmni on the new env, with your application config specified.

Before you proceed, check /etc/bahmni-backrest.conf in the old env to make sure all configuration options are correctly set. We advice that you set a common root directory for all backup artefacts (easier to copy). Check the WIKI page on Configuration of backup관련 문서: Configure backup

$ bahmni -i <inventory file> backup --backup_type=all --options=all

Copy the backup root directory - to similar path in new env. It can be different as well, but then you should edit the configuration file /etc/bahmni-backrest.conf

Then run the restore command. Check the WIKI Backup/restore page for restore commands and관련 문서: Backup/Restore commands

# the below db restore is just an example, you need to specify individual databases and appropriate 
# options for restoration. Check WIKI page listed above for commands

$ bahmni -i <inventory file> restore --restore_type=db --options=<DBName> --strategy=<dump/pitr> --restore_point=<Backup foldername>

$ bahmni -i <inventory file> --restore_type=file  --options=all
원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗