Linux-Postgres Musings
To take a dump from linux server and compress it
psql -U username -F filename
psql -U postgres -d postgres -f chameli.sql
pg_dump -U postgres postgres -f /tmp/chameli.sql
tar -cvzf abc.tar.gz chameli.sql
tar -zcvf archive-name.tar.gz directory-name
To use a dump file to setup db in win machine
Use
pg_restore.exe --host "localhost" --port "5432" -U "postgres" --dbname "postgres" --verbose --schema "public" "C:\Users\abhinav\Downloads\new03march.backup"
psql -U username -F filename
psql -U postgres -d postgres -f chameli.sql
pg_dump -U postgres postgres -f /tmp/chameli.sql
tar -cvzf abc.tar.gz chameli.sql
tar -zcvf archive-name.tar.gz directory-name
To use a dump file to setup db in win machine
Use
pg_restore.exe --host "localhost" --port "5432" -U "postgres" --dbname "postgres" --verbose --schema "public" "C:\Users\abhinav\Downloads\new03march.backup"
Comments
Post a Comment