In this postgresql backup and recovery process we are taking the actual backup from 63 server the database name is 2ndquadrant.in after that we will restore the backup to 185 server with different name of www.tutorialdba.com
- current server is windows client server
- 18.104.22.168 server is linux server
- 22.214.171.124 server is windows server
We are taking 2ndquadrant.in databse backup from 126.96.36.199 by using windows client server :
pg_dump -d 2ndquadrant.in -h 188.8.131.52 -p 5444 -U enterprisedb -f "E:\dc.sql"
Then we are creating the database name as www.tutorialdba.com to destination server that is the windows server
psql -U enterprisedb -h 184.108.40.206 -p 5434 -c "create database www.tutorialdba.com;"
Restore the taken backup of dc file into the 185 windows server by using windows client server utility
psql -U enterprisedb -d www.tutorialdba.com -h 172.25.154.185 -p 5434 -f "E:\dc.sql"