Use the following steps to replicate a PostGIS database:
- Create directories for the primary and standby database clusters by executing the following commands:
> mkdir postgis_cookbook/db > mkdir postgis_cookbook/db/primary > mkdir postgis_cookbook/db/standby
- Initialize the database clusters with initdb as follows, defining the user me as the owner of the database:
> cd postgis_cookbook/db > initdb --encoding=utf8 --locale=en_US.utf-8 -U me -D primary > initdb --encoding=utf8 --locale=en_US.utf-8 -U me -D standby
- You may opt for avoiding the --locale=en_US.utf-8 option if an error occurs; in that case, the system will adopt the default locale on your computer.
- Create directories for the archives of the primary and standby ...