Skip to content

Instantly share code, notes, and snippets.

@IamADav
Created March 20, 2019 09:23
Show Gist options
  • Save IamADav/74515a6da66813977f674cda843211e8 to your computer and use it in GitHub Desktop.
Save IamADav/74515a6da66813977f674cda843211e8 to your computer and use it in GitHub Desktop.
pg dump
#it in docker
docker exec -it 980733335feb /bin/bash
#create dump
PGSSLMODE=allow
pg_dump -h xx.postgres.azure.com -p 5432 --username user@xx --table table --dbname db_name --file ./file.sql
#restore dump
psql -U username -d database_name -1 -f ./file.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment