Skip to content

Instantly share code, notes, and snippets.

@pvin
Last active April 8, 2020 05:30
Show Gist options
  • Save pvin/4cece42f7d57a68c3c57c208eb541058 to your computer and use it in GitHub Desktop.
Save pvin/4cece42f7d57a68c3c57c208eb541058 to your computer and use it in GitHub Desktop.
postgres taking sql dump and undumping sql file
taking dump in server
sudo su - postgres
pg_dump ata_production > database_name_ata.sql
ls to check
server to local
scp deployer@5.145.356.214:/var/lib/postgresql/database_name.sql /home/praaveen/projects/database_name.sql
local to server
scp /home/janani/Desktop/new.csv root@1.118.36.109:/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