Last active
March 31, 2023 10:28
-
-
Save vampyar/2bd45f83ec8eb79ad7c9a733027cd5e8 to your computer and use it in GitHub Desktop.
Create dump from remote RDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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