Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Warning |
---|
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. |
Steps to be Performed
Note |
---|
Note:
|
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 harddrive, then only harddrive gets detached. |
- Encrypt USB/External drive using steps mentioned in https://miguelmenendez.pro/en/articles/encrypt-usb-storage-device-linux-unified-key-setup-luks.html. Note down the password in a secret location. And don't keep a password that is shared / re-used / easy-to-guess. This is a ONE TIME activity for the drive. Encrypting the USB has the advantage that even if you lost it, you will feel a little better that it will be very difficult for someone to get to the data.
- Mount the hard drive at /media/USB.
Create directories in the USB (use the mkdir command):
Code Block # 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):
Code Block # 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.
title | Known issue with above encryption step |
---|
https://bugzilla
.
Panel | ||
---|---|---|
| ||