DB Dump - playground

This tutorial will walk you through How to take DB dump
  1. 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. 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. 3.
    Copying zip file to your local machine
    kubectl cp <playground-pod-name>:/backup.sql.gz backup.sql.gz -n playground
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.