Table of Contents

Backup

Make sure to have a good backup/restore plan for disaster-recovery scenarios.
This plan should be tested and verified continuously.

  1. Follow the backup procedures for PAS here: Post Installation Tasks: Backup / Restore

    1. Daily backup is also performed for the configuration (phenix-store.json), to the directory /config/backups.
  2. Backup of database:

    • Standalone installations will have the database in the PAS file structure, so as long as the complete file structure is backed up, database should be as well.
      Scheduled backup of the database is also done to the directory /data/backup.

    • Clustered installations use an external MySQL/MSSQL database, and backup should be done by the administrators responsible for the database.

Automatic daily backup configuration

PhenixID Server configuration is stored in config/phenix-store.json. By default this file is backed up every night at 02:00 and saved for 7 generations.

Backups are stored in directory config/backups/<timestamp>/

Actual backup is performed by a pipe started by the built-in scheduler. All configuration is created automatically on first server start and bound to the local node.

Scheduler

The scheduler is responsible for executing the backup at specified time. Scheduling requires the scheduler module to be running on the local node. Scheduler jobs are stored in configuration section SCHEDULES.

Schedule execution is configured using a cron like syntax using 6 or 7 whitespace separated fields

Field Name Mandatory Allowed Values Allowed Special Characters
Seconds YES 0-59 , - * /
Minutes YES 0-59 , - * /
Hours YES 0-23 , - * /
Day of month YES 1-31 , - * ? / L W
Month YES 1-12 or JAN-DEC , - * /
Day of week YES 1-7 or SUN-SAT , - * ? / L #
Year NO empty, 1970-2099 , - * /

For more information on the cron syntax see the documentation for the Quartz Scheduler

Example schedule for node 'demo':

{
  "id" : "demo_backup",
  "description" : "Auto generated schedule for backing up server config. Runs by default 02:00 every night.",
  "enabled" : "true",
  "boundToNode" : "demo",
  "cronSyntax" : "0 0 2 * * ? *",
  "pipeid" : "demo_backup"
}

Backup pipe

The backup pipe executes the actual file backup using the FileBackupValve.

FileBackupValve properties:

  • path: path and file name of file to backup
  • count: number of backup generations to keep

Note: A FileBackupValve can only backup one single path/file. To backup more than one path/file, add a FileBackupValve for each path/file to the pipe.

Example backup pipe for node 'demo':

{
  "id" : "demo_backup",
  "description" : "Auto generated pipe for backing up server config",
  "valves" : [ {
    "name" : "FileBackupValve",
    "config" : {
      "path" : "./config/phenix-store.json",
      "count" : "7"
    }
  } ]
}

Cluster support

Backup is compatible with clustering since each node defines its own backup configuration bound to that specific node using cluster unique ids containing the node name/id. Schedule is also bound to the node using the boundToNode property, limiting execution to the specified node.