Database Backup and Restore procedures

GNUmed takes the utmost care to safeguard your medical data during upgrade and operation:

However, disaster strikes when it is least expected and there is a whole world of trouble GNUmed cannot do anything about. There are a few rules prudent to follow:

If you follow the above advice you have done quite a bit to be on the safe side. The PostgreSQL Manual has excellent chapters on backup and restore as well as replication and availability. Be sure to read it.

GNUmed provides some scripts and configuration files which, under *nix, are ready for integration with cron/anacron. They can be found:

The next sections provide an overview of the configuration and script files. For more information, consult the in-line comments within the respective files.

Configuration (.conf) files setup

The location and names of the .conf files need to be correctly-referenced in the dependent script files. By default, the scripts expect to find the .conf files in the directory /etc/gnumed with names gnumed-backup.conf and gnumed-restore.conf.

In addition, each .conf file contains a series of options which should nearly always be changed. These include

Script (.sh) files setup

The scripts gm-backup_database.sh and gm-restore_database.sh can be run unchanged except for the appended Mac OS constraints.

Note also that when running the backup or restore manually – where you had not further configured pg_hba.conf to allow root to access the GNUmed database as "gm-dbo", and where you had not set up a .pgpass file – what works is to

Mac OS constraints:

Archival emails:

Additional arcane and rarely needed information can be found on this page

Caveats about backing up and restoring