Skip to content

Commit e569680

Browse files
committed
docs: import CloudNativePG main
1 parent 0c4b26f commit e569680

1 file changed

Lines changed: 50 additions & 14 deletions

File tree

website/docs/appendixes/backup_barmanobjectstore.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -248,24 +248,26 @@ spec:
248248
backupRetentionPolicy: "keep"
249249
```
250250

251-
## Extra options for the backup and WAL commands
251+
## Extra options for the backup, WAL Archiving, and Restore
252252

253-
You can append additional options to the `barman-cloud-backup` and `barman-cloud-wal-archive` commands by using
254-
the `additionalCommandArgs` property in the
255-
`.spec.backup.barmanObjectStore.data` and `.spec.backup.barmanObjectStore.wal` sections respectively.
256-
These properties are lists of strings that will be appended to the
257-
`barman-cloud-backup` and `barman-cloud-wal-archive` commands.
253+
You can append additional options to the underlying `barman-cloud-*` commands using
254+
the corresponding fields in the `barmanObjectStore` section of the `Cluster` resource.
255+
256+
- `.barmanObjectStore.data.additionalCommandArgs` for the `barman-cloud-backup`
257+
- `.barmanObjectStore.data.restoreAdditionalCommandArgs` for the `barman-cloud-restore`
258+
- `.barmanObjectStore.wal.archiveAdditionalCommandArgs` for the `barman-cloud-wal-archive`
259+
- `.barmanObjectStore.wal.restoreAdditionalCommandArgs` for the `barman-cloud-wal-restore`
260+
261+
262+
Each field accepts a list of string arguments. If an argument conflicts with one already
263+
present in the declared options in its section, the user-provided value will be ignored.
258264

259265
For example, you can use the `--read-timeout=60` to customize the connection
260266
reading timeout.
261267

262-
For additional options supported by `barman-cloud-backup` and `barman-cloud-wal-archive` commands you can refer to the
268+
For additional options supported by `barman-cloud-*` commands you can refer to the
263269
official barman documentation [here](https://www.pgbarman.org/documentation/).
264270

265-
If an option provided in `additionalCommandArgs` is already present in the
266-
declared options in its section (`.spec.backup.barmanObjectStore.data` or `.spec.backup.barmanObjectStore.wal`), the extra option will be
267-
ignored.
268-
269271
The following is an example of how to use this property:
270272

271273
For backups:
@@ -284,7 +286,25 @@ spec:
284286
- "--read-timeout=60"
285287
```
286288

287-
For WAL files:
289+
For restores, the `restoreAdditionalCommandArgs` are taken from the `barmanObjectStore`
290+
of the external cluster the recovery is reading from, that is the entry named by
291+
`.spec.bootstrap.recovery.source`, not from `.spec.backup`:
292+
293+
```yaml
294+
apiVersion: postgresql.cnpg.io/v1
295+
kind: Cluster
296+
[...]
297+
spec:
298+
externalClusters:
299+
- name: clusterBackup
300+
barmanObjectStore:
301+
[...]
302+
data:
303+
restoreAdditionalCommandArgs:
304+
- "--read-timeout=60"
305+
```
306+
307+
For WAL Archiving files:
288308

289309
```yaml
290310
apiVersion: postgresql.cnpg.io/v1
@@ -295,11 +315,27 @@ spec:
295315
barmanObjectStore:
296316
[...]
297317
wal:
298-
additionalCommandArgs:
318+
archiveAdditionalCommandArgs:
299319
- "--max-concurrency=1"
300320
- "--read-timeout=60"
301321
```
302322

323+
For WAL Restoring files:
324+
325+
```yaml
326+
apiVersion: postgresql.cnpg.io/v1
327+
kind: Cluster
328+
[...]
329+
spec:
330+
externalClusters:
331+
- name: clusterBackup
332+
barmanObjectStore:
333+
[...]
334+
wal:
335+
restoreAdditionalCommandArgs:
336+
- "--read-timeout=60"
337+
```
338+
303339
## Recovery from an object store
304340

305341
You can recover from a backup created by Barman Cloud and stored on a supported
@@ -358,4 +394,4 @@ as documented in ["Configure the application database"](../recovery.md#configure
358394
archive. This feature can appreciably reduce the recovery time. Make sure that
359395
you plan ahead for this scenario and correctly tune the value of this parameter
360396
for your environment. It will make a difference when you need it, and you will.
361-
:::
397+
:::

0 commit comments

Comments
 (0)