Client Information Back-Ups
Submitted by Guest on Sat, 12/01/2013 - 09:25
Hello! We are looking into possibly using the OpenPVMS software for our clinic but had a question about how exactly the information is backed up- Is it backed up by OpenVPMS or locally by us? If OpenPVMS is backing up the information how do we know it's level of security for our client's sake? Also, is there an option to have the information backed-up locally?
Thank you for any help!!
-stingop1988
Re: Client Information Back-Ups
The OpenVPMS software uses a MySQL database to store all of its data.
You simply need to back up this database using the mysqldump tool provided as part of the MySQL installation. Typically you would schedule this to be run nightly, and the database dump stored offsite.
-Tim
Re: Client Information Back-Ups
Since Mysql 5 the removed the sheduling abilities of a mysqladministrator package, (thats now in the commercial offering)
However I have attached below my backup script...it does a daily backup at 4am. and rotates them down to a weekly backup and then at the end of the month it does monthly....which is archived
simlply copy this to a batch file under windows (mines called sqlbackup.bat). I copied mysqldump to this directory from my mysql installation. You may need to create a user with the correct priveledges under mysql to allow them to backup. Enter there username and password in the appropriate part of the script. Also make sure you set the server ip or url. You shouldnt be backing up to the same computer the server is installed on...but if you have to at least backup to a removable harddrive.
Run
SQLBACKUP --install
to create a directory structure under your backup directory
SQLBACKUP --ADDSHEDULEDTASK
will try and create a task under your schedule of jobs OR you can make one manually.
test the newly created schedule task and your done.
START SQLBACKUP.bat
END SQLBACKUP.BAT
Re: Client Information Back-Ups
Ben - a question and an observation:
Q: is there any reason why you didn't use the --single-transaction option. In my case (where the system is running 24/7) I will need this.
O: have you seen that Percona has what looks like a useful backup too - see http://www.percona.com/software/percona-xtrabackup - currently its for Linux systems, but they have a windows version in alpha testing.
Regards, Tim G
Re: Client Information Back-Ups
My data wont be in use...unless something has gone pear shapped at 4am (when I set the backup)
hence I used LOCK ALL TABLES (-x)
from mysql...
The
--single-transaction
option and the--lock-tables
option are mutually exclusive becauseLOCK TABLES
causes any pending transactions to be committed implicitly.I think Lock all tables in a situation where no or very low use would occur is probably more reliable than single transaction.
See below why Single transaction might fail(all be it very unlikely)
While a
--single-transaction
dump is in process, to ensure a valid dump file (correct table contents and binary log coordinates), no other connection should use the following statements:ALTER TABLE
,CREATE TABLE
,DROP TABLE
,RENAME TABLE
,TRUNCATE TABLE
. A consistent read is not isolated from those statements, so use of them on a table to be dumped can cause theSELECT
that is performed by mysqldump to retrieve the table contents to obtain incorrect contents or fail.With regard to percona Im now taking a look.
Tim I also run a mysql slave master setup ...just because I can...and wanted to test it out...which provides excellent redundancy.
Re: Client Information Back-Ups
MySQL GUI Tools v5.0 is still available and includes MySQL Administrator which provides a simple interface for regular and scheduled backups; it's not the latest version, but it's probably a lot easier for a new entrant to OpenVPMS to get started with. I use it regularly to backup to both local internal and external drives and cloud sites (eg dropbox), and I regularly restore the latest backup to my "learning/demo" OpenVPMS on a laptop.
The installers for MySQL GUI Tools are located at:
http://downloads.mysql.com/archives.php?p=mysql-gui-tools
and the specific installer for Windows (v5.0r17) is:
http://downloads.mysql.com/archives/mysql-gui-tools/mysql-gui-tools-5.0-...
A tutorial for using MySQL GUI Tools is located at:
http://openvpms.org/documentation/backing-and-restoring-your-openvpms-data
Re: Client Information Back-Ups
Firstly is it possible to move this thread to implementation (I shouldnt have created it here)
That being said:
Be aware if you use my script above to backup ALL DATABASES the backup includes the mysql performance schema, which is a memory only database that exists while the server is running. Backing it up is probably pointless. The ALL DATABASES option really exists to do bare metal restores...IE the hard drive collapsed and you lost the entire database. Mostly you should add the database you want to backup as a parameter.
If you do restore an backup that included all that info - you will find that you get a restore error
It doesnt seem to affect data consistency of the table however you can add the --SKIP-LOCKED-TABLES parameter to the restore to avoid the error.
The concern is that the restored mysql instance is inconsistent. In this case the advice would be to stop an restart the server after a restore at this level. This clears the tables in memory and removes inconsitencies in the performance schema.