9.1. Backing Up HUB Static Configurations

Warning

The backup process only includes static configurations and selected database tables. Job and task-related data are not included in the backup.

Ngenea Hub provides a set of commands to efficiently backup and restore its critical static configurations and selected database tables, ensuring quick recovery and minimal downtime during system upgrades or failures.

These commands allow administrators to safeguard important configuration data, such as schedules, users, workflows, external targets, and spaces, while excluding transient job and task data, which helps streamline the process and reduce the overall backup size.

ngeneahubctl backup --help

Usage: ngeneahubctl backup [OPTIONS] COMMAND [ARGS]...

  Backup and restore ngeneahub static configurations

Options:
  --help  Show this message and exit.

Commands:
  export   Export ngeneahub static configurations to a file
  restore  Restore ngeneahub static configurations from a file

9.1.1. Backup

The backup process captures key Ngenea Hub configurations and selected database tables, providing a snapshot of the system’s critical static configurations.

To perform a backup Ngenea Hub's database container ngeneahub_db_1 must be running or Ngenea Hub fully operational.

To start the Ngenea Hub database container separately run;

docker start ngeneahub_db_1

9.1.1.1. Command:

ngeneahubctl backup export --help

Usage: ngeneahubctl backup export [OPTIONS]

  Export ngeneahub static configurations to a file

Options:
  -o, --output DIRECTORY  Location to store generated archive. Default
                          '$(PWD)'
  --help                  Show this message and exit.

This command performs the following:

  • Database dump: Exports selected tables related to schedules, users, workflows, external targets, global configurations,spaces etc into a SQL file.

  • Configuration backup: Copies static configuration files from key directories:

    • /etc/ngenea/postgres (PostgreSQL settings)

    • /etc/ngenea/redis (Redis configurations)

    • /etc/ngenea/rabbitmq (RabbitMQ configurations)

    • /etc/ngenea/ngenea-client.conf (Hub client configuration)

    • /etc/sysconfig/ngeneahub (Hub configuration)

  • Archive creation: Packs the SQL dump and configuration files into a compressed archive (ngeneahub_backup_<timestamp>.tar.gz) which will be written to the current working directory or a directory as specified by -o, --output command line option.

9.1.2. Restore

Note

Depending on the scenario a wipe maybe required before restoring a backup.

The restore process reinstates the backed-up database tables and configuration files, returning the Hub to its operational state following a failure or upgrade.

To perform a restoration Ngenea Hub should be fully operational.

Note

After performing a restoration all services needs to be restarted

9.1.2.1. Command:

ngeneahubctl backup restore <backup-file>
ngeneahubctl backup restore --help

Usage: ngeneahubctl backup restore [OPTIONS] PATH

  Restore ngeneahub static configurations from a file

Options:
  --help  Show this message and exit.

This command performs the following:

  • Unpack the backup archive: Extracts the contents of the backup file.

  • Restore configurations: Copies the saved configuration files back into their respective directories, re-establishing the static system setup.

  • Truncate and reset tables: Clears the selected database tables, resetting them to ensure no conflicts with the incoming data.

  • Import the SQL dump: Inserts the backed-up data into the database, restoring schedules, users, workflows, targets, and spaces.