Professional Documents
Culture Documents
Steps To Backup-Restore OpenEMR Express Edition
Steps To Backup-Restore OpenEMR Express Edition
Prepared by
ViSolve Inc.,
6559, Springpath Lane, San Jose, California 95120, USA
Email: services@visolve.com
July 8 2020
Version Edited By Date
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.)
● 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.