Created
January 20, 2019 05:59
-
-
Save harunurkst/523c978f33e8098ed7a16bb8e6415f3c to your computer and use it in GitHub Desktop.
dump postgresql database from server to local
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
# step -1 | |
# backup db in server folder | |
pg_dump -U postgres your_dbname > name_you_want_to_save.sql | |
# Step -2 | |
# Copy from server to local | |
scp -P 2205 [email protected]:location/of/your/server/sql/file.sql . | |
# replace ip, port, user with your origin data | |
# replace /location/of/your/... with your sql file in server | |
# dont forget about last DOT ( . ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment