Backing up your Database

Astun supply a Database Backup script which you may download and install to backup your PostgreSQL database(s).

You may also wish to Extract Non-System Functions from the iShare Database especially if you have created bespoke Functions.

Requirements

  • Python 2.5+ (at present tested on 2.5 and 2.6 but not Python 3)
  • PygreSQL - will be installed with Python as part of the Astun 3rd Party Installer. The directory with libpq.dll must also be in your PATH environment variable.
  • PostgreSQL (tested on 8.1, 8.4, 9.0, 9.5 but should work on any intermediate versions).


Installation

If you have selected to install the Backup application this will have been installed into the Astun/Tools/DatabaseBackup folder.

The Astun Backup folder contains the following:

  • The backup script itself, database_backup.py
  • The config file config.ini
  • A Required subfolder containing additional modules needed to run the script
  • Logs subfolder into which log files will be saved

In addition, there may be compiled python "pyc" files which are created when the script is run.

Please note: If the folder contents are changed in any way there is no guarantee that the script will run.

Implementation

The script takes configuration information from the config.ini file that must be present in the same folder as the backup script.  

Please refer to the Database Backup Configuration topic for details on how to update the config.ini file.

Running the Backup Script

Once you have configured the Astun Database Backup script you may run it in various ways e.g.