Restore
./setup.sh -r restores Ascender from a backup taken with ./setup.sh -b. It replaces the PostgreSQL database of a running Ascender installation with the contents of the backup and restores the secrets and deployment configuration that go with it.
The Ascender version running in the cluster must be the version the backup was taken from. Restoring across versions is not supported.
You can restore onto the installation the backup came from, or onto a fresh installation of the same version, for example after losing a cluster.
Restore supports only the built-in PostgreSQL database. If ASCENDER_PGSQL_HOST is set, ./setup.sh -r prints a message and stops without changing anything; restore an external database with your own tools, such as pg_restore. Restore covers Ascender only. Ledger, Ascender Registry, Reaqt, and Galaxy Proxy data are restored from your own volume or database backups.
Prerequisites
- A running Ascender installation, with the operator, web, task, and PostgreSQL pods present, in the namespace set by
ASCENDER_NAMESPACE. It can be the original installation or a fresh one of the same version, installed with the samecustom.config.yml. - The installer directory with your
custom.config.yml, on a control machine withkubectlaccess to the cluster through~/.kube/config. Run the restore as the same user that ran the installation. - The backup in
backups/current/under the artifacts directory (ascender_install_artifacts/backups/current/by default). - The cluster must be able to pull the
busybox:stableimage.
The restore deletes the existing PostgreSQL volume and replaces the database completely. Everything stored in the running installation since the backup is lost. Make sure backups/current points to the backup you want before you start.
Run a restore
From the installer directory:
./setup.sh -r
Ascender is unavailable while the restore runs, which takes several minutes or longer for large databases.
What happens during a restore
- Clean up. Removes any
ascender-app-restore(AWXRestore) andascender-app-backup(AWXBackup) resources and anytemp-copy-podleft from an earlier run. - Create a staging volume. Creates an
AWXBackupnamedascender-app-backupof the running installation. The restore uses its volume claim as a staging area; its contents are not used. - Copy the backup into the cluster. Starts
temp-copy-podwith the staging volume mounted, copiestower.db,secrets.yml, andawx_objectfrombackups/current/into/backups/ascender_restore/, sets their ownership and permissions, and removes the pod. - Restore the database secret. Applies the PostgreSQL configuration secret from
secrets.yml. - Recreate the database. Scales the operator, web, and task deployments and the PostgreSQL StatefulSet to zero, deletes the PostgreSQL volume claim (
postgres-15-ascender-app-postgres-15-0), and scales PostgreSQL back up with an empty database. - Restore. Creates an
AWXRestoreresource that points the operator at the backup files. The operator restores the database dump, the secrets, and the deployment configuration. - Start Ascender. Scales the operator back up, waits for the PostgreSQL and web pods, and removes the
AWXRestoreresource.
Verify the restore
Check that the pods are running:
kubectl get pods -n ascender
Log in to Ascender and check that organizations, credentials, inventories, and job templates match the time of the backup. Log in with the administrator password from the backup.
Common scenarios
Roll back the running installation
- Check that
backups/currentpoints to the backup you want. - Run
./setup.sh -r.
Restore onto a new cluster
- Install Ascender with the Ascender Pro installer, using the same Ascender version and your saved
custom.config.yml. - Copy the backup directory to
ascender_install_artifacts/backups/on the control machine and pointcurrentat it, as described below. - Run
./setup.sh -r.
Restore an older backup
backups/current is a symbolic link to the newest backup. To restore another backup, or after copying backups to a new machine, point the link at the backup directory:
cd ascender_install_artifacts/backups
rm -f current
ln -s "$PWD/backup-20260309T214902" current
Then run ./setup.sh -r.
Limitations
- Built-in database only. External PostgreSQL databases are not restored.
- Same version. The running Ascender version must match the backup.
- Same namespace. The restore uses the namespace in
ASCENDER_NAMESPACE. - Downtime. Ascender is unavailable during the restore. Plan a maintenance window.