@@ -128,6 +128,53 @@ For more information on how this works and what configuration settings are
128128editable, please visit the "[ Custom PostgreSQL configuration] ({{< relref "/advanced/custom-configuration.md" >}})"
129129section of the documentation.
130130
131+ ## Provisioning Using a Backup from an Another PostgreSQL Cluster
132+
133+ When provisioning a new PostgreSQL cluster, it is possible to bootstrap the cluster using an
134+ existing backup from either another PostgreSQL cluster that is currently running, or from a
135+ PostgreSQL cluster that no longer exists (specifically a cluster that was deleted using the
136+ ` keep-backups ` option, as discussed in section [ Deprovisioning] ( #deprovisioning ) below). This
137+ is specifically accomplished by performing a ` pgbackrest restore ` during cluster initialization
138+ in order to populate the initial ` PGDATA ` directory for the new cluster using the contents of a
139+ backup from another cluster.
140+
141+ To leverage this capability, the name of the cluster containing the backup that should be utilzed
142+ when restoring simply needs to be specified using the ` restore-from ` option when creating a new
143+ cluster:
144+
145+ ``` shell
146+ pgo create cluster mycluster2 --restore-from=mycluster1
147+ ```
148+
149+ By default, pgBackRest will restore the latest backup available in the repository, and will replay
150+ all available WAL archives. However, additional pgBackRest options can be specified using the
151+ ` restore-opts ` option, which allows the restore command to be further tailored and customized. For
152+ instance, the following demonstrates how a point-in-time restore can be utilized when creating a
153+ new cluster:
154+
155+ ``` shell
156+ pgo create cluster mycluster2 \
157+ --restore-from=mycluster1 \
158+ --restore-opts=" --type=time --target='2020-07-02 20:19:36.13557+00'"
159+ ```
160+
161+ Additionally, if bootstrapping from a cluster the utilizes AWS S3 storage with pgBackRest (or a
162+ cluster that utilized AWS S3 storage in the case of a former cluster), you can also also specify
163+ ` s3 ` as the repository type in order to restore from a backup stored in an S3 storage bucket:
164+
165+ ``` shell
166+ pgo create cluster mycluster2 \
167+ --restore-from=mycluster1 \
168+ --restore-opts=" --repo-type=s3"
169+ ```
170+
171+ When restoring from a cluster that is currently running, the new cluster will simply connect to
172+ the existing pgBackRest repository host for that cluster in order to perform the pgBackRest
173+ restore. If restoring from a former cluster that has since been deleted, a new pgBackRest
174+ repository host will be deployed for the sole purpose of bootstrapping the new cluster, and will
175+ then be destroyed once the restore is complete. Also, please note that it is only possible for
176+ one cluster to bootstrap from another cluster (whether running or not) at any given time.
177+
131178## Deprovisioning
132179
133180There may become a point where you need to completely deprovision, or delete, a
0 commit comments