As mentioned earlier in this chapter, repmgr is a management suite to manage replication setups and also to create replicas and add them to the existing PostgreSQL clusters. In this recipe, we are going to create a new clone of the primary server.
This recipe builds on from the previous recipe. Here we are going to create a replica of the primary server
pg-primary and as we said we need two machines participating in this configuration. Our replica server will be titled
pg-clone and the
/data location will be our data directory.
All the following commands in this recipe are carried out in the replica server pg-clone. Here are the complete steps: