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
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
Please make sure to use the inventory file and replace the below command.
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:
MySQL databases: Component relevant (openmrs, bahmni_reports etc)
On new env, you can restore the files exactly in the same locations
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
# 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