Do not forget to run delete to delete all the resources you have created, when you no longer need the cluster.

In case you are using the Embedded PostgreSQL, the delete command destroys the metadata persistence, that is, the table definitions.

If you want to save the cluster metadata for later deployment, you need to run a dump on the Embedded PostgreSQL, before deleting the cluster. This dump generates a text file with SQL commands that, when fed back to the new Embedded PostgreSQL, will recreate the database in the same state as it was at the time of the dump.

Dump of the old Embedded Postgresql
kubectl exec <PostgreSQL Pod> -- bash -c "PGPASSWORD=hive pg_dump -c -U hive -h localhost metastore" > database.sql
Restore the new Embedded Postgresql
 cat database.sql | kubectl exec -i <PostgreSQL Pod> -- bash -c "PGPASSWORD=hive psql -U hive -h localhost -d metastore"


Restoring the database is the first thing to do before creating new tables in the Denodo Embedded MPP.

Add feedback