DB Dump - playground
This tutorial will walk you through How to take DB dump
- 1.In order to take DB to dump, exec into the playground pod, use the below command to do that
kubectl get pods -n playground
kubectl exec <playground-pod-name> -it -n playground bash
- 2.Use the below command to take
pg_dump -Fp --no-acl --no-owner --no-privileges -h <db-host> egov_db -U dbusername > backup.sql
gzip backup.sql.gz backup.sql
- 3.Copying zip file to your local machinekubectl cp <playground-pod-name>:/backup.sql.gz backup.sql.gz -n playground
Last modified 9mo ago