An informational guide for the maintenance of eCW servers.
It is critical that every practice save a backup of their data at least once per day. Each practice may have their own preferred procedure for backing up the data, such as tape, hard disk, or DVD backup options. eCW recommends a few options to minimize the impact in the case of data loss or hard disk/server crash.
During the initial installation of the eCW software for all customers, a backup schedule task is created to backup the MySQL database; however this backup should not be relied upon for true data backup.
The possibility exists that this scheduled backup data could become corrupted or may not be retrievable. Also, this scheduled task may stop functioning if the customer changed the password for the administrator login needed to create the backup task.
Creating data backups is a crucial practice responsibility. Clients are advised to discus this with their I.T. Company or Consultant. You can also contact us at Medical Computer Networks for help with your office Backups.
Note: Do not back up the data on to the hard disk of your server. If for any reason the server crashes or the hard disk fails, the data and all saved backups on the disk will be lost.
Backups should always be saved to an external hard disk or a tape drive.
When in doubt, contact Medical Computer Networks Support for details regarding data backup.
Note: Keep the copy of the backup for at least 15 – 30 days before you choose to overwrite the tapes.
Database Backup: Offline vs. Online
One important thing to determine when it comes to backup of data is to make a choice of offline backup versus online backup.
eCW recommends the safest way to save a backup of a database is to take the MySQL service offline and make a copy of the database to a tape or network location. However, if the practice cannot afford the downtime involved with backing up offline, then backing up online would be a suitable solution.
MySQL provides different options to make an online copy (sometimes referred to as a “hot copy”) of the database without taking the MySQL service offline. The options include mysqldump, mysqlsnapshot, or similar MySQL backup tools. eCW has an option to create a mysqldump file and can retain a copy of this file for backup.
Note: Do not perform a backup on a live database. This could result in corruption of the database tables. A tape backup of the mobiledoc folder should be run only when the MySQL Service is stopped.
The alternative is to use the mysqlsnapshot or mysqldump to create the copy of the database to a separate folder and then back this data to tape.
What Should I Back Up?
This is a common question asked by nearly all new practices. The following folders are crucial and must be backed up.
Database – All patient records and data entered into eCW are stored here
FTP documents – Documents that are scanned and attached to patients
Tomcat files – Static data that only changes when an upgrade is performed
IMPORTANT! The folders listed above can reside on different servers or different drives with different names, depending on the setup of the servers. Be sure to locate and back up the proper files.
If you have any questions about these files contact Medical Computer Networks Support.
Backing up FTP Files
The file size of the FTP folder can be extremely large depending upon the number of documents attached to the patients and the number of documents scanned by the practice. eCW recommends saving a copy of the FTP files on a daily basis.
Backup of the FTP folder must be incremental; only the modified files or new files added from the last full backup should be backed up. This will ensure a complete copy of the FTP documents without having to copy the repetitive data each time a backup of the FTP files is taken.
Location of Files to be Backed Up
Everyone might have a different architecture, depending on the size of the facility and the requirements of the customer. The setup could be a single server where all these data is stored or there will be multiple servers where the data is distributed and stored.
If you have a single server which hosts MySQL, Tomcat, and FTP services, then the data that you need to backup is located on the same server under different folder names.
Typically eCW Client side files will be found in the following locations:
For Data (Daily Backup)
Mobiledoc is the name of the folder. This contains database files and can be stored with a different name.
Patient Documents (Incremental Backup)
This folder contains the files that are scanned and/or attached to the patient documents section from the eCW application, and can exist with a different name.
Tomcat Folders (Before and after an Upgrade)
Data in the Tomcat5 folder is static and is not changed unless there was an upgrade. eClinicalWorks recommends saving a backup of the Tomcat5 folder before an upgrade is performed and after the upgrade is complete.
The Auto-Upgrade utility used for upgrades performs the automatic backup of the required files to be modified during the upgrade.
Perform the backup during off hours when eCW application is not being used. Please review the scheduled tasks on the server under Control Panel to determine when the MySQL service is offline on your server, and then schedule the backup to run during that interval.
Backup Restore and Data Verification
At Medical Computer Networks, we recommend monthly verification of the data that has been backed up to ensure data integrity. Restore verification should be done on a system other than the production servers. We recommend the following process for data restore and verification:
1. You can restore the backup preferably to a different computer other than the server or to a temporary location on your server. Compare the size of the database that is restored with the original database and it is normally of the same size.
2. Compare the restored file size with the corresponding production files. There could be a minor or no difference in the file sizes depending on how current the restored backup is. When restoring and verifying immediately after the backup is complete, there should be no difference in the file size or modified date on the files.
3. Run Mysqlcheck with the –C option on the restored database.
For example: mysqlcheck –c <<databasename>> -u<<dbuser>> -p<<dbpassword> >-P<<dbport>>
4. Mysqlcheck should return OK on each table giving an indication that MySQL is able to read those tables.
Note: Do not inadvertently restore the data to the original location from where you backed up. By doing so, the backup will overwrite the original data and there is the possibility of data loss.
Other Backup Options
In a proactive approach to prevent accidental data loss, eCW has been deploying the use of binary logs. The binary logs keep a log of all data entered into the database in the binary log files. These logs can be used to restore your data incase of data loss.
In the event of a hard disk crash, the data cannot be restored from these files or any other backup files that eCW creates. We strongly recommend that the customers perform their own independent backups to an external backup source.
The binary logs generated can be used to build a slave database server (Database Replication) for the customers who are interested to invest in the slave database server. This slave server will serve as a backup server as well in case the data on the master server is corrupted or the master server crashes. (However this slave server will only provide the replication of the database and not the FTP files.)
Medical Computer Networks-Managed Disaster Recovery
MC-Networks offers a backup service option for clients where the practice data is backed up offsite. This is a paid service offered by MC-Networks. Contact the MC-Networks Sales Department for more details.