10.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 back up and restore critical static configurations and selected database tables. This ensures quick recovery and minimal downtime during system upgrades or failures.
These commands allow administrators to safeguard essential configuration data such as schedules, users, workflows, external targets, and spaces, while excluding transient job and task data. This approach streamlines the process and reduces the overall backup size..
Job information is not saved into an exported backup and therefore cannot be restored.
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
10.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, the Ngenea Hub database container (ngeneahub_db_1)
must be running, or Ngenea Hub must be fully operational.
To start the Ngenea Hub database container separately, run the following command:
docker start ngeneahub_db_1
10.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 actions:
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: Packages the SQL dump and configuration files into a compressed archive
(ngeneahub_backup_<timestamp>.tar.gz)
. The archive is saved to the current working directory, or to a directory specified by the-o
or--output
command-line option.
10.1.2. Restore¶
Note
Depending on the scenario, a wipe may be 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 must be fully operational.
Note
After performing a restoration, all services need to be restarted.
10.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.