Scheduling backups
Red Hat Edge Manager does not include a built-in backup scheduler. Run flightctl-backup from cron on Red Hat Enterprise Linux or from a Kubernetes CronJob on Red Hat OpenShift Container Platform to automate backups. Implement retention in your wrapper script or storage lifecycle policy.
Red Hat Enterprise Linux example (cron) Copy linkLink copied!
Run backup daily at 02:00, write archives to /var/backups/rhem, and delete archives older than 14 days:
# /etc/cron.d/rhem-backup (example — adjust paths and retention to your environment)
0 2 * * * root /usr/local/bin/flightctl-backup --output /var/backups/rhem && \
find /var/backups/rhem -name 'flightctl-backup-*.tar.gz' -mtime +14 -delete
Install flightctl-backup on the host where cron runs (typically the Red Hat Edge Manager Red Hat Enterprise Linux system). Ensure the job runs non-interactively and that log output is captured by your logging stack.
Red Hat OpenShift Container Platform example (CronJob) Copy linkLink copied!
Schedule backup from a Job that runs flightctl-backup on a management image or an admin workstation with cluster credentials. The following manifest is illustrative; replace the image, command, volume mounts, and service account with values that match your cluster security policy:
apiVersion: batch/v1
kind: CronJob
metadata:
name: rhem-backup
namespace: rhem-chart-namespace
spec:
schedule: "0 2 * * *"
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: backup
image: registry.redhat.io/edge-manager/edge-manager-rhel9:1.3
command:
- /bin/sh
- -c
- flightctl-backup --output /backup && cp /backup/flightctl-backup-*.tar.gz* /pvc/
volumeMounts:
- name: backup-pvc
mountPath: /backup
volumes:
- name: backup-pvc
persistentVolumeClaim:
claimName: rhem-backup-pvc
Image version must match your deployed Red Hat Edge Manager version.
Ansible Automation Platform on Red Hat OpenShift Container Platform uses a dedicated backup operator for long-term cluster backup patterns. Red Hat Edge Manager documents CronJob-based scheduling so you can integrate with your existing backup platform. You are not required to deploy a separate Red Hat Edge Manager operator for backups.
Verification in scheduled jobs Copy linkLink copied!
After each scheduled run:
- Confirm the archive and
.sha256files exist. - Run
sha256sum -con the newest archive. - Periodically perform a full restore test in a non-production environment. For more information about testing backups, see Additional resources.