Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

A Step-by-Step Guide to Backup/Restore

OpenEMR Express Edition (EE) in AWS


Cloud

Prepared by
ViSolve Inc.,
6559, Springpath Lane, San Jose, California 95120, USA
Email: services@visolve.com
July 8 2020
Version Edited By Date

Initial version ViSolve AWS OpenEMR Hosting Team July 8 2020


Why backup your OpenEMR data?

Your OpenEMR business data is key to your business continuity (interface


with patients/appointments/generation of revenues), cross-organizational functions
(back-office billing) etc. Constantly changing and continually expanding, your
patient record and your business information are key for your service. You want
this information readily available even if there is a system failure and/or some
natural disasters.

ViSolve recommends a reliable, secure (even at rest) backup regularly for


your business. Most importantly, make sure your backup is a “good” one by
practicing regular restore from your backup.

Though most of the steps are automated and already comes with the
OpenEMR community edition, we are providing here an enhanced, flexible backup
and restore approaches in this document including steps to store your data at your
own server in your office or at your home from the cloud.

Backup Script
OpenEMR EE has inbuilt backup and restore scripts. ViSolve has tweaked the
scripts for ease of use.

Backup Script can be found under the location /etc/cron.daily in the server-side
(NOT inside the container).
● To execute the script, navigate to the directory and edit the script
# ​cd /etc/cron.daily
● Open the duplicity backup script with your favorite editor:
# ​vi duplicity-backups
Make the following changes to the above file so the DB, as well as the patient
documents will be backed up.
● Move the highlighted line to the position specified. ​(If you need additional help
please mail to ​support@visolve.com​ )
● By executing the following script your database, as well as your data, will be
backed-up. However, this is already in the cron table of the system and will be
done regularly as per the server crontable configuration. You can also run the
following command manually to back up OpenEMR data by logging into the
host server and this will do a FULL backup.
# ​sudo /etc/cron.daily/duplicity-backups
● There will be two stored back up file and both will be in the folder
/root/backups in tar format
Something like…..
-​rw------- 1 root root 9999292 Mar 10 11:48 duplicity-full.xxxtimestampxxx.difftar.gz
-rw------- 1 root root 84926 Mar 10 11:48 duplicity-full-signatures.20200310T11482.sigtar.gz
Restore Script

In case of OpenEMR crash, follow these steps to recover your OpenEMR system
1. To restore the data, execute the restore script which is placed in the root
directory.
2. Navigate to the root directory using
# cd /root/
3. Run the script using the following command
# ​sh restore.sh
(The above command will restore the database as well as the documents of
OpenEMR Express Edition.)

How to validate the Backup ?

● Create a new instance(Similar to the one when you have setup the Express
Edition)
● Follow the steps 1 - 3 in the above topic(Restore script) to restore the data.
● Log into your OpenEMR new instance and access some sample patients to
make sure the restore is working.
● Another possibility to validate is to use a function that will count the patients
or check the calendar whether all the appointments are there etc.

You might also like