This topic walks you through the tasks you perform to prepare the primary and recovery cluster for disaster recovery. You perform the tasks in this section before a disaster has occurred.
In the preparation phase, you:
You configure the primary cluster in order to enable WAL archiving and backing up to the repository.
VMware supplies template files for this configuration, located in /usr/local/gpdr/templates
.
These configuration files contain such configuration information as the path to the repository storage location and the storage type. This information varies by storage type.
These configuration files are summarized in the following table:
Type | Description | Example Template |
---|---|---|
Posix | Configuration for Posix-compliant file systems and NFS | posix_config_file.yml |
GCS | Configuration for Google Cloud Storage (GCS) and GCS-compatible objects | gcs_config_file.yml |
S3 | AWS S3 and S3-compatible object stores (for example, MinIO) | s3_config_file.yml |
All 3 types | Additional useful options, such as archiving options and options governing expiration policy, among other things. | optional-config-examples.yml |
NoteThere is one configuration file for each type of storage. In addition to required options, you may also included optional options in your configuration file. These are provided in the
optional-config-examples.yml
file; simpl add them to the file of your choice, that is, POSIX, GCS or S3.
To configure the primary cluster, you:
gpdr configure backup --config-file
command As part of this process, GPDR restarts the primary cluster and WAL archiving begins.
Before running gpdr configure restore
on the recovery cluster you must:
Before running gpdr configure restore on the recovery cluster you must: * Ensure that all the roles that existed on the primary cluster also exist on the recovery cluster * Install all the required extensions on the recovery cluster
NoteIt is up to you to keep extensions in sync between the primary and recovery clusters.
There are two ways to configure a recovery cluster:
In either of these cases, you must also pass the required --config-file
option to gpdr configure restore
.
In this scenario, you tell GPDR to use an existing, provisioned cluster as the recovery cluster. You run the gpdr configure restore
command from this cluster's coordinator host.
To configure the recovery cluster:
gpdr configure restore
command with the --config-file
option and –-use-existing-cluster
In this scenario, you let GPDR initialize a recovery cluster for you. You configure a number of important settings for the recovery cluster, such as:
We supply template files for recovery cluster configuration, located in /usr/local/gpdr/templates
.
The following table summarizes each type of recovery cluster configuration file:
Description | Example Template |
---|---|
Recovery configuration for Greenplum 6 | recovery_cluster_config_file_gp6.yml |
Recovery configuration for Greenplum 7 | recovery_cluster_config_file_gp7.yml |
To configure the recovery cluster:
gpdr configure restore
command with the --config-file
and –recovery-cluster-config-file
options.