It is recommended to perform a daily / periodic backup of Bahmni data and store it offsite to avoid complete loss of data during a natural disaster, etc. |
Note:
|
There is a known issue in Linux Kernel with the above encryption step because of which system needs to be shutdown after copying backup to the external hard drive, then only hard drive gets detached. Read here: https://bugzilla.redhat.com/show_bug.cgi?id=809188. Please test before proceeding. |
Create directories in the USB (use the mkdir command):
# Folder struture emr_backup |____ database |____ patient_images |____ document_images |____ uploaded-files |____ uploaded_results |____ pacs_images |____archive |
Unlock it with the command ‘cryptsetup luksOpen LUKS0001’ with passphrase/password.
Mount the hard drive using command ‘mount /dev/mapper/LUKS0001 /media/USB'
Copy the backups as per the below steps (NOTE:rsync is a command line program for doing delta updates / copy. Read more about it here):
# Take database backup using the DB backup scripts for MySQL and PostGreSQL DBs cd ~/bahmni-environment/scripts ./backup-mysql.sh password ./backup-psql.sh cp /backup/<two newly created files> /media/USB/emr_backup/database/ # Backup image files - patient images, document images, pacs images, uploaded_results, uploaded-files (depending on what features of Bahmni you are using) rsync -rh --progress -i --itemize-changes --update /home/bahmni/patient_images /media/USB/emr_backup/patient_images/../ rsync -rh --progress -i --itemize-changes --update /home/bahmni/document_images /media/USB/emr_backup/document_images/../ rsync -rh --progress -i --itemize-changes --update /home/bahmni/uploaded-files /media/USB/emr_backup/uploaded-files/../ rsync -rh --progress -i --itemize-changes --update /home/bahmni/uploaded_results /media/USB/emr_backup/uploaded_results/../ rsync -rh --progress -i --itemize-changes --update /var/lib/bahmni/dcm4chee-2.18.1-psql/server/default/archive /media/USB/emr_backup/pacs_images/archive/../ |
Umount the disk using ‘umount /media/USB'.
Lock the drive again with ‘cryptsetup luksClose LUKS0001'.
Disconnect the hard drive and keep it in a safe, secure and remote place from the production environment.