Revised Jan. 2, 2025
Nothing that you do on your computer in the course of a day — or for that matter, a month — has anywhere near the significance of your backup procedure. A good backup will someday mean the difference between a minor inconvenience and a very costly disaster.
What can you do to safeguard your data?
1. SOS Applications do not have a built-in backup program. Use high-quality, brand-name data backup software or the backup software that comes with your backup media.
2. Configure your backup software to TURN ON all error checking, correction, verify options, data compression feature, and automatic compare feature. Always use the full backup option. Enable the encryption option, and if there is none, find other software. If you will be transporting the backup out of the office, encryption is essential to avoid a potential data breach. The loss or theft of your SOS backup would compromise the privacy of all your patients and result in serious and expensive HIPAA-related remediation and possible civil or even criminal prosecution. Ensure that you record the encryption key and that all parties who need it can find it should the need arise. Your backups will do you no good if you cannot decrypt them.
3. Next, you might want to follow the instructions that came with your backup software for creating a setup or script that will permit you to backup only those files you want to save. You can, for example, have a setup that backs up only the data files in your \SOS\DATA folder, which contains the SOS database.
4. All good backup programs include a notification feature that will tell the program to email a report to you at the end of every backup operation to let you know if any errors were encountered. Checking to be sure your backup is running correctly is critical; this option makes that part of the process quick and easy.
5. It is essential that you rotate your backup media. In short, this means you never use the same cartridge, tape, or backup disk two days in a row. The bare minimum should be a rotation through three backup sets. Still, we strongly recommend backup each day of the week, plus several more for rotating off-premises.
The safety location is often the home of one of the people in the office. Storing some backups off-premises provides you with an extra margin of safety in the event of a fire, burglary, or other event that might result in the loss of the data on your hard disk and any media stored near the computer. We strongly suggest storage in another location. For additional security, SOS recommends making periodic “archival” backups that are never over-written. Archival backups should be stored in a secure off-premises location, such as a bank safe deposit box. This extra step will allow you to restore your financial data for a quarter or longer. An alternative for archival backups is to make backups that are saved to an online repository.
6. In addition to your multiple generations of local backups, you should consider using one of the many online backup services or have your IT consultant set up regular uploads of an encrypted backup to an off-site web server, preferably located far from your office. If you choose this route, select a vendor that provides pre-transmission encryption. The only way you can be sure your data is not at risk is if you encrypt it BEFORE sending it off-site!
Note that as of October 2013, new HIPAA rules went into effect that require you to execute a formal Business Associate Agreement (BAA) with any vendor who “creates, receives, maintains, or transmits protected health information.” That would seem to include online backup services. If you do not execute a Business Associate Agreement with this type of vendor, you might be in violation of the new HIPAA rules.
7. Have a disaster recovery drill regularly. Start by shutting down your database and renaming your DATA folder in SOS to something else, such as DATASAVE. Now, try to restore your backup, following the appropriate restore procedure for your backup software. When the restore is complete, open SOS to be sure the database is intact and contains all the data you believe it should. If you cannot open the database, something is wrong with your backup procedure, and you must correct it. If the program starts properly and you can access all your data, you know your backup procedure is working. You can now delete the DATASAVE folder.
If you follow the procedure outlined above, your data should be safe and available should you ever have to restore it from a backup.
Copying the Database Files While The Database Is Running
In some installations, it is desirable to keep the database running 24 hours a day or to do a backup without stopping the database. You cannot backup a running SQL Anywhere database using commercial backup software, so a special procedure must be used. (Even if you manage to make such a backup of the files while they are open, it is exceedingly unlikely that the database will run after being restored.)
There is a downside to running the database non-stop. Several maintenance/cleanup procedures run automatically when the database is started. If you never restart the database, you might run into minor issues, such as the inability to log into the system with a particular user ID after that user disconnected from the database in an unusual fashion. See Database Tools in the Admin Module to clean up manually. SOS recommends restarting the database once daily to allow these maintenance procedures to run.
Even though you cannot backup the data files while the database is running, you can make a copy of the running database in a separate directory. You can then configure your backup software to back up the copy and ignore the directory in which the production database files are located.
There are two ways to make a copy of the database while people are in the program:
- Via a Command Line
- For this purpose, starting with SOS 2016, you will need user credentials for an account with no rights other than creating a copy of the database files while they are in use. Backup-only user accounts are created on the Backup Users tab of the user account maintenance list in the Administration module.
- Create a batch file (CMD file) containing the following command. This example assumes the software is installed in the SOS folder on the C: drive. Make adjustments as appropriate. It is important to note that this command file must be run directly on the computer that runs the database.
- You can use the command line below to make a copy of the database.
DBBACKUP -y -c “uid=<backup user account ID>;pwd=<backup user account password>;dsn=SOSDATA” <target directory>
Here is an example command line for SOS 2016, including an optional -y parameter to create the directory if it doesn’t exist, and to overwrite existing files:
DBBACKUP -y -c “uid=BU_BILL;pwd=PASSword#1;dsn=SOSDATA” C:\SOSBU
- Generally, copies of a running database are done using a Windows-scheduled task that executes the command above, one or more times daily.
- Via a utility in the ADMIN module called Copy Database
- Click on the SOSLogin and enter your Super ID and password.
- Click on ADMIN
- Click on Database Tools
- Highlight DBA Utilities and click Select (hand icon)
- Click on Tools then Copy Database
- Select the path where you want to copy the database to or enter a path you want to create
- Check the last box -Y. This will create the directory if it doesn’t exits.
- Click the Copy
To backup the copy of the database files, you need to make sure that this target directory is included in your backup configuration so that the database copy is backed up. Set the backup to skip the \SOS\DATA directory in which the running database files are located.
