Last active
April 8, 2020 05:30
-
-
Save pvin/4cece42f7d57a68c3c57c208eb541058 to your computer and use it in GitHub Desktop.
postgres taking sql dump and undumping sql file
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
taking dump in server | |
sudo su - postgres | |
pg_dump ata_production > database_name_ata.sql | |
ls to check | |
server to local | |
scp [email protected]:/var/lib/postgresql/database_name.sql /home/praaveen/projects/database_name.sql | |
local to server | |
scp /home/janani/Desktop/new.csv [email protected]:/var/www/sfy-niew | |
dumping into local db | |
psql database_name < /home/praaveen/projects/database_name.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment