diff --git a/docs/modules/ROOT/pages/vshn-managed/postgresql/delete.adoc b/docs/modules/ROOT/pages/vshn-managed/postgresql/delete.adoc index cc2d252..4c26805 100644 --- a/docs/modules/ROOT/pages/vshn-managed/postgresql/delete.adoc +++ b/docs/modules/ROOT/pages/vshn-managed/postgresql/delete.adoc @@ -1,5 +1,7 @@ = Delete a PostgreSQL service +== Delete non protected PostgreSQL instance + If you do not need your PostgreSQL service anymore, you can delete it in the same way as you would with any other object in your cluster: [source,bash] @@ -12,3 +14,44 @@ $ oc delete vshnpostgresqls.vshn.appcat.vshn.io my-postgres-example ==== If you delete the `VSHNPostgreSQL` object from the cluster, it will be deleted together with all of its data! ==== + +== Delete protected PostgreSQL instance + +A PostgreSQL instance that is protected from deletion cannot be deleted right away. +First disable deletion protection then delete the instance. + +. Disable deletion protection: ++ +[source,bash] +---- +$ oc edit vshnpostgresqls.vshn.appcat.vshn.io my-postgres-example +---- ++ +[source,yaml] +---- +apiVersion: vshn.appcat.vshn.io/v1 +kind: VSHNPostgreSQL +metadata: + name: pgsql-app1-prod + namespace: prod-app +spec: + parameters: + backup: + deletionProtection: false # <1> + writeConnectionSecretToRef: + name: postgres-creds +---- +<1> Make sure the parameter is set to false + +. Delete the instance ++ +[source,bash] +---- +$ oc delete vshnpostgresqls.vshn.appcat.vshn.io my-postgres-example +---- ++ +[IMPORTANT] +.Non-reversible operation +==== +If you delete the `VSHNPostgreSQL` object from the cluster, it will be deleted together with all of its data! +==== \ No newline at end of file diff --git a/docs/modules/ROOT/pages/vshn-managed/postgresql/restore.adoc b/docs/modules/ROOT/pages/vshn-managed/postgresql/restore.adoc index 09eee17..1d43584 100644 --- a/docs/modules/ROOT/pages/vshn-managed/postgresql/restore.adoc +++ b/docs/modules/ROOT/pages/vshn-managed/postgresql/restore.adoc @@ -56,4 +56,13 @@ spec: <2> The backup name you want to restore <3> You need to specify that this is not a normal instance but a restored one + -NOTE: The restore process is the same as ordering a new instance. The only difference is the backup information in `spec.parameters.restore` and `spec.compositionRef` objects. +[NOTE] +==== +The restore process is the same as ordering a new instance. +The only difference is the backup information in `spec.parameters.restore` and `spec.compositionRef` objects. +==== + +== Deleting a Restored Instance + +The deletion process of a restored instance is the same as for normal instance. +Check out xref:vshn-managed/postgresql/delete.adoc[this guide] how to delete a PostgreSQL instance. \ No newline at end of file