Skip to main content

Create an automated MySQL backup

You can create a backup of the Contrast MySQL database on a regularly scheduled basis. During installation, you can select this option and define a time and location for storing database backups.

If you skip this step during installation, you can still configure Contrast later to schedule database backups.

Steps

  1. Find Contrast database settings in $CONTRAST_HOME/data/conf/database.properties.

  2. Use the encrypted properties editor to identify database settings. The example below shows a Contrast database with backups enabled, scheduled and in a specific location. You can edit these settings, if any options need to change.

    contrast@TeamServer:~/contrast/bin$ ./edit-properties -e ../data/esapi/ -f ../data/conf/database.properties
    
    database.bk.time                                  : 4:0:0
    database.bk.enabled                               : true
    database.bk.dir                                   : /mnt/backups/mysql/contrast
  3. If you want to upgrade Contrast, you should capture any data created or changed since the last scheduled backup.