Logical PostgreSQL Backup
If it hasn't been done already, the bitnami
Helm repository
needs to be added to your local configuration:
# Add bitnami helm repo
$ helm repo add bitnami https://charts.bitnami.com/bitnami
Install the PostgreSQL chart from the bitnami
Helm repository:
$ kubectl create namespace postgresql
$ helm install --namespace postgresql postgres bitnami/postgresql
The following command can be used to create the PostgreSQL Blueprint in the K10 namespace.
$ kubectl --namespace kasten-io apply -f \
https://raw.githubusercontent.com/kanisterio/kanister/0.91.0/examples/postgresql/blueprint-v2/postgres-blueprint.yaml
Alternatively, use the Blueprints page on K10 Dashboard to create the Blueprint resource.
Once the Blueprint is created, add an annotation on the PostgreSQL Deployment to instruct K10 to use the Blueprint when performing operations on this PostgreSQL instance.
$ kubectl --namespace postgresql annotate statefulset/postgres-postgresql \
kanister.kasten.io/blueprint=postgres-bp
Finally, use K10 to backup and restore the application.