Environment
YugabyteDB Anywhere - all versions
Issue
Your support agent has requested that you create a dump of the YugabyteDB Anywhere (YBA) database for analysis.
The following command will dump the database and exclude sensitive tables containing user information, KMS information, API keys, TLS certificate information, or audit information.
Resolution
Using Kubernetes:
kubectl exec <name of the pod> -n <namespace> -it -c postgres -- pg_dump \
-T access_key \
-T alert_channel \
-T audit \
-T audit_id_seq \
-T certificate_info \
-T kms_config \
-T customer_config \
-T kms_history \
-T provider \
-T region \
-T users \
-U postgres yugaware > /tmp/platform_dump$(date -u -I).sql
For example:
kubectl exec pod/platform-yugaware-0 -n yugaware -it -c postgres -- pg_dump -T access_key -T alert_channel -T audit -T audit_id_seq -T certificate_info -T kms_config -T customer_config -T kms_history -T provider -T region -T users -U postgres yugaware > /tmp/platform_dump$(date -u -I).sql
Using Replicated Installation Path:
Execute the following command:
sudo docker exec -it postgres pg_dump \
-T access_key \
-T alert_channel \
-T audit \
-T audit_id_seq \
-T certificate_info \
-T customer_config \
-T kms_config \
-T kms_history \
-T provider \
-T region \
-T users \
-U postgres yugaware | gzip -c >/tmp/platform_dump_$(date -u -I).sql.gz
Using Yugabundle Installation:
Execute the following command:
$pg_dump \
-T access_key \
-T alert_channel \
-T audit \
-T audit_id_seq \
-T certificate_info \
-T customer_config \
-T kms_config \
-T kms_history \
-T provider \
-T region \
-T users \
-U postgres yugaware | gzip -c >/tmp/platform_dump_$(date -u -I).sql.gz
Using YBA Installer Installation:
Execute the following commands as yugabyte user:
$cd /opt/yugabyte/software/<ybanywhere_version>/pgsql/bin
$./pg_dump \
-h localhost \
-T access_key \
-T alert_channel \
-T audit \
-T audit_id_seq \
-T certificate_info \
-T customer_config \
-T kms_config \
-T kms_history \
-T provider \
-T region \
-T users \
-U postgres yugaware | gzip -c >/tmp/platform_dump_$(date -u -I).sql.gz
Upload the file /tmp/yuga_dump[date].sql.gz to the support ticket.
Comments
0 comments
Please sign in to leave a comment.