@@ -20,6 +20,7 @@ Cloud Plugin, with **no downtime**. Follow these steps:
2020- Modify the ` Cluster ` resource in a single atomic change to switch from
2121 in-tree backup to the plugin
2222- Update any ` ScheduledBackup ` resources to use the plugin
23+ - Update the ` externalClusters ` configuration, where applicable
2324
2425::: tip
2526For a working example, refer to [ this commit] ( https://github.com/cloudnative-pg/cnpg-playground/commit/596f30e252896edf8f734991c3538df87630f6f7 )
@@ -102,7 +103,7 @@ As you can see, the contents of `barmanObjectStore` have been copied directly
102103under the `configuration` field of the `ObjectStore` resource, using the same
103104secret references.
104105
105- # # Step 2: Update the `Cluster`
106+ # # Step 2: Update the `Cluster` for plugin WAL archiving
106107
107108Once the `ObjectStore` resource is in place, update the `Cluster` resource as
108109follows in a single atomic change :
@@ -174,3 +175,85 @@ spec:
174175` ` `
175176
176177---
178+
179+ # # Step 4: Update the `externalClusters` configuration
180+
181+ If your `Cluster` relies on one or more external clusters that use the in-tree
182+ Barman Cloud integration, you need to update those configurations to use the
183+ plugin-based architecture.
184+
185+ When a replica cluster fetches WAL files or base backups from an external
186+ source that used the built-in backup method, follow these steps :
187+
188+ 1. Create a corresponding `ObjectStore` resource for the external cluster, as
189+ shown in [Step 1](#step-1-define-the-objectstore)
190+ 2. Update the `externalClusters` section of your replica cluster to use the
191+ plugin instead of the in-tree `barmanObjectStore` field
192+
193+ # ## Example
194+
195+ Consider the original configuration using in-tree Barman Cloud :
196+
197+ ` ` ` yaml
198+ apiVersion: postgresql.cnpg.io/v1
199+ kind: Cluster
200+ metadata:
201+ name: pg-us
202+ spec:
203+ # [...]
204+ externalClusters:
205+ - name: pg-eu
206+ barmanObjectStore:
207+ destinationPath: s3://backups/
208+ endpointURL: http://minio-eu:9000
209+ serverName: pg-eu
210+ s3Credentials:
211+ accessKeyId:
212+ name: minio-eu
213+ key: ACCESS_KEY_ID
214+ secretAccessKey:
215+ name: minio-eu
216+ key: ACCESS_SECRET_KEY
217+ wal:
218+ compression: gzip
219+ ` ` `
220+
221+ Create the `ObjectStore` resource for the external cluster :
222+
223+ ` ` ` yaml
224+ apiVersion: barmancloud.cnpg.io/v1
225+ kind: ObjectStore
226+ metadata:
227+ name: minio-eu
228+ spec:
229+ configuration:
230+ destinationPath: s3://backups/
231+ endpointURL: http://minio-eu:9000
232+ s3Credentials:
233+ accessKeyId:
234+ name: minio-eu
235+ key: ACCESS_KEY_ID
236+ secretAccessKey:
237+ name: minio-eu
238+ key: ACCESS_SECRET_KEY
239+ wal:
240+ compression: gzip
241+ ` ` `
242+
243+ Update the external cluster configuration to use the plugin :
244+
245+ ` ` ` yaml
246+ apiVersion: postgresql.cnpg.io/v1
247+ kind: Cluster
248+ metadata:
249+ name: pg-us
250+ spec:
251+ # [...]
252+ externalClusters:
253+ - name: pg-eu
254+ plugin:
255+ name: barman-cloud.cloudnative-pg.io
256+ parameters:
257+ barmanObjectName: minio-eu
258+ serverName: pg-eu
259+ ` ` `
0 commit comments