Run flightctl-backup as a Kubernetes Job or CronJob inside the cluster with appropriate RBAC permissions to create an archive of database, PKI Secrets, configuration, and Helm values for disaster recovery.
Before you begin
- Prerequisites for backup and restore are satisfied.
kubectl context points at the cluster and namespace where Red Hat Edge Manager is installed.
helm can read the release that deployed Red Hat Edge Manager (for user-supplied values).
- Writable local or mounted directory for
--output.
Procedure
-
Set the namespace variable for your deployment (replace
rhem-chart-namespace):
export RHEM_NS=rhem-chart-namespace
kubectl config set-context --current --namespace="$RHEM_NS"
-
Confirm that
flightctl and flightctl-backup match the Red Hat Edge Manager deployment:
Run flightctl version when the CLI can reach the Red Hat Edge Manager API (use flightctl login if needed) so you can compare Client Version, Server Version, and flightctl-backup version. For more information about prerequisites for backup and restore, see Additional resources.
flightctl version
flightctl-backup version
-
Run the backup:
mkdir -p "$HOME/rhem-backups"
flightctl-backup --output "$HOME/rhem-backups"
The command detects the Kubernetes deployment, dumps the internal database when applicable, exports PKI Secrets and the service ConfigMap, and captures Helm values used for the release.
-
Verify the archive and checksum:
ls -l "$HOME/rhem-backups"/flightctl-backup-*.tar.gz*
sha256sum -c "$HOME/rhem-backups"/flightctl-backup-*.tar.gz.sha256
-
Copy the archive pair to storage outside the cluster failure domain.
Results
- Checksum verification succeeds.
metadata.json inside the archive (optional inspection) lists deployment type kubernetes and the expected Red Hat Edge Manager version.