Skip to content

Instantly share code, notes, and snippets.

@vampyar
Last active March 31, 2023 10:28
Show Gist options
  • Save vampyar/2bd45f83ec8eb79ad7c9a733027cd5e8 to your computer and use it in GitHub Desktop.
Save vampyar/2bd45f83ec8eb79ad7c9a733027cd5e8 to your computer and use it in GitHub Desktop.
Create dump from remote RDS
// create dump from remote service not using local pg client
docker exec -i postgres_container bash -c "pg_dump --dbname=postgresql://$PGUSER:$PGPASSWORD@$PGHOST:$PGPORT/$PGDB" > /asbolute/direction/path/dump.sql
// for apply dump on the local db
docker exec -i postgres_container psql -U postgres local_db_name < /Users/vampyar/Projects/Careclix/dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment