Database Reference
In-Depth Information
"C:\\postgis_cookbook\\db\\primary\\archive\\%f"'
# for Windows
7. StartPostgreSQLontheprimarydatabaseclusterbyexecutingthefollowing
command:
> pg_ctl start -D primary -l
primary\postgres.log
8. Create a base backup of the primary database cluster and copy it to the
standbydatabasecluster.Beforeperformingthebackup,createanexclusion
list file for xcopy (Windows only) by executing the following command:
> notepad exclude.txt
9. Add the following to exclude.txt :
postmaster.pid
pg_xlog
10. Runthebasebackupandcopythedirectorycontentsfromtheprimarytothe
standby database cluster, as follows:
> psql -p 5433 -d postgres -c "SELECT
pg_start_backup('base_backup', true)"
> xcopy primary/ standby /e
/exclude:exclude.txt
> psql -p 5433 -d postgres -c "SELECT
pg_stop_backup()"
11. Make the following changes to the standby cluster's postgresql.conf
configuration file:
port = 5434
hot_standby = on
archive_command = 'copy "%p"
"C:\\postgis_cookbook\\db\\standby\\archive\\%f"'
# for Windows
Search WWH ::




Custom Search