Backing up and restoring
Learn how to back up and restore User Data Services data.
Backup
Backup is automatic. Set backup type and frequency in the Analytics Proxy custom resource.
postgres:
storage_class: ibmc-block-bronze
storage_size: 10G
backup_type: incremental
backup_frequency: '@daily'
Restoring the PostgreSQL cluster
To restore the PostgreSQL cluster, perform the following steps:
-
Log in to the OpenShift cluster using
oc login
command, and switch to<foundational-services>
project.oc login --token=<token> --server=<server-url> oc project <your-foundational-services-namespace>
-
Run the following command:
oc annotate postgrescluster instrumentationdb --overwrite postgres-operator.crunchydata.com/pgbackrest-restore=id1
After you run the command the database is restored with the latest backup.
-
Wait until the database pods are running.