Data backup

sunch wrote on Tuesday, June 23, 2009:

Hi I am somewhat new to openemr but not to opensource.  What is the best protocal for backup?  There is a back-up option in the admin panel and this would have to be done manually.

If files do go currupt can the saved data simply be imported via phpmyadmin?   

There ia a method called Mandriva Backup but the link goes to the OpenEMR 2.8.2 Appliance Manual which seems outdated.

Is there a new method to faciliate backup and recovery? 

Thanks

bradymiller wrote on Wednesday, June 24, 2009:

hey,

Depends whether your using windows or linux. With linux there are lots of ways to do it via scripts and programs such as rsync.  There is a more uptodate Backup section in the most recent OpenEMR 3.0.1 Appliance Manual here:
http://bradymd.com/appliance/manual4/

-brady

sunch wrote on Thursday, June 25, 2009:

Thanks I am using linux.  Is there a lits of scripts and programs in a directory somewhere. I’m using the version I downloaded from sourceforge.  I had initially installed another variant and want to make sure what I use is related to the version I have

bradymiller wrote on Friday, June 26, 2009:

hey,

I’m assuming your using version 3.0.1 (same as 3.0.0.1) .

I know of no uptodate backup scripts included in openemr (except for the admin->backup method within openemr). There is a script linked in the above manual link. I think most users use whatever backup method they were already comfortable with (ie. creating their own scripts, using rsync, tar, over internet, to cd, etc.). Read through the chapter and script example in the above link to get a good idea of what needs to be done.

The basic premise for backup is two steps (both very straightforward to script):
1)back up the openemr mysql database
2)back up the openemr web directory

In linux, their are innumerable ways to do the above. Some, as in admin->backup simply perform the above steps and then bundle together in an archive. This backup can then be burned to a DVD or to another server.  Scripts like this can be scheduled/automated via cron. Other use tools such as rsync.

-brady

bradymiller wrote on Friday, June 26, 2009:

Also, to answer your initial restoring question. To restore from the backup file you created in admin->backup, there is a restore script included in openemr here:
openemr/contrib/util/restore

-brady

vambati wrote on Thursday, August 30, 2012:

I would like to know what backup strategy openemr users are using?

I.e

1. Online backup at one of the online backup providers
Or
2. External hard drive with in the clinic, Ian worried about this option since it is not off site.
Or
3. Burn CD and take it home.
Or
4. External hard drive at off site ( like home ) and remotely back it up

Please let me know what everyone is doing.

Thank you
Venkat

hitechelp wrote on Thursday, August 30, 2012:

Hi Venkat,

We run OpenEMR 4.1.0 v11 on Ubuntu Linux 11.10  using OpenEMR’s built in backup (Administration > Backup) to download the OpenEMR web directory, SQL database and configuration (tar) files to an offsite Windows 7 PC.  Then we burn them to a DVD that is mounted for use like a USB drive (a Windows 7 feature)   We also backup our event log file to the same DVD (eventlog_yyyymmdd_hhmmss.sql) using Webmin to download it from the servers /tmp/emr_eventlog_backup directory.   We can fit about 45 days worth of backup files to a single DVD.

We are a Psych practice with 400+ patients.  Our backups are about 200mb and it takes around 6 minutes to download over an ATT DSL connection.  

I hope this helps.

Regards,
David

blankev wrote on Thursday, August 30, 2012:

Brady and others,

now the appliance manual is mentioned, OpenEMR 3.0.1 Appliance Manual here: is the VMWare appliance still an option to use for next release version 4.1.1 and if the answer is YES, does a backup with the OpenEMR version working trough the appliance and does this also cover a restore function? Can the VMWare-Backup made of OpenEMR also be used for different OpenEMR production sites on different other non WMWare Server models?

I tried VMWare appliance is the past but experienced difficulties restoring the oepnEMR version I was using after a calamity, so I stopped using VMWare, but think it might be a better solution for a local PC version.

Tnx in advance, Pimm

bradymiller wrote on Saturday, September 01, 2012:

Hi,

Note there is also a discussion of this here:
http://sourceforge.net/projects/openemr/forums/forum/202504/topic/5594334

Regarding Appliance, a it continues to be released (the 4.1.1 version will likely happen over the weekend). The Appliance can be used to backup/restore like any other installation with on more possibility; and that is a simple shut it down and copy the entire thing and then restart it.

-brady
OpenEMR

blankev wrote on Saturday, September 01, 2012:

Tonight I did a fair share of reading. You call it a simple shutdown and copy. But what part do I copy? I see in the Virtual machine I discovered my directories and have no clue of WHAT is WHAT in Linux. Or do I make a complete backup of the Dir in Windows? What would be easy, but when OpenEMR is filled with data of 5000 clients after some years of consultations, how many Bytes should be available for backup media?

QUestion: Compared with the Windows directories XAMPP/htdocs/  and XAMPP/Mysql where are these to be found in the Virtual Machine?

Tnx again, Pimm

bradymiller wrote on Sunday, September 02, 2012:

Hi Pimm,

The appliance really gives you two potential directions for backup (you can even do both simultaneously). Since it is an appliance, one crude backup mechanism would be to:
1. shut down the appliance
2. then backup the entire directory (it starts at a size of 3gb, so would be rather large)
3. restart the appliance

The other option is utilizing backup mechanism within the appliance (ie. using linux/ubuntu tools). One example is provided on the above wiki backup page (see the Ubuntu mechanism; note I just yanked the Mandriva mechanism because it is very outdated). The nice thing about these types of mechanism is that there is no need to shut anything down (mysqldump can backup a mysql database while it is being used). A very useful linux tool is rsync, which can be used to backup to hard drives/ other computers, and/or across the internet. Backing up via linux is so flexible that a huge amount of solutions are available (you can be pretty much as creative as you want). For example, could do a mysqldump daily to a directory and then rsync this file and the complete openemr web directory daily to a drive on your site. Then to avoid using up any more resources on your main computer, you could have another computer on a daily basis process(package it into a date stamped zip file) this backup from the hard drive and send it to multiple locations etc. There are a huge number of possibilities.

Note that within the appliance you are using ubuntu and OpenEMR is at /var/www/openemr (akin to XAMPP/htdocs/ (I actually don’t even know where the mysql databases are stored, because don’t need to know it (mysqldump/mysql are used to backup/restore the database).

-brady
OpenEMR