Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Stop postgres service on master and slave
- Right click postgres service -> properties->LogOn-> browse and set the domain as root or vrtxengg(for us) and set password to postgres
- Master:
- 1 .In postgres.conf
- set wal_level to hot_standby
- max_wal_ssenders to 1
- wal_keep_argument to 10
- archieve_mode to on
- archieve_command to ' copy “%p” “\\\\(salve IpAddress)\\(Slave restore folder – split by \\ )\\%f” '
- 2. Hba.conf
- add the ip for everyone to see
- Slave:
- 1. postgres.conf
- hot_standby to on
- 2. Create new file in postgres\data folder and rename to recovery.conf
- Enter
- restore_command = ' copy “\\\\(slave IPAddress)\\(Slave restore folder – split by \\ )\\%f” “%p” '
- standby_mode = on
- primary_conninfo = ' host =(masterIP) port = 5432 user=postgres password=postgres '
- Start master
- Go to postgres bin dir and start command prompt
- type psql -U postgres
- give password as postgres
- Type select pg_start_backup('base');
- From master copy all the files and folders in data directory except .conf and .pid files
- Paste to slave data folder
- In master, in the opened command prompt type
- select pg_stop_backup();
- Now start the client postgres
Add Comment
Please, Sign In to add comment