mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-07-08 02:32:21 +02:00
Compare commits
3 Commits
80dda8288a
...
01f19565bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01f19565bb | ||
|
|
cdfa352d92 | ||
|
|
d5e249d828 |
@ -176,6 +176,25 @@ spec:
|
||||
format: int32
|
||||
minimum: 1
|
||||
type: integer
|
||||
restoreAdditionalCommandArgs:
|
||||
description: |-
|
||||
Additional arguments that can be appended to the 'barman-cloud-restore'
|
||||
command-line invocation. These arguments provide flexibility to customize
|
||||
the data restore process further, according to specific requirements or
|
||||
configurations.
|
||||
|
||||
Example:
|
||||
In a scenario where specialized restore options are required, such as setting
|
||||
a specific read timeout or defining custom behavior, users can use this field
|
||||
to specify additional command arguments.
|
||||
|
||||
Note:
|
||||
It's essential to ensure that the provided arguments are valid and supported
|
||||
by the 'barman-cloud-restore' command, to avoid potential errors or unintended
|
||||
behavior during execution.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
destinationPath:
|
||||
description: |-
|
||||
|
||||
4
go.mod
4
go.mod
@ -7,7 +7,7 @@ toolchain go1.26.3
|
||||
require (
|
||||
github.com/cert-manager/cert-manager v1.20.2
|
||||
github.com/cloudnative-pg/api v1.29.0
|
||||
github.com/cloudnative-pg/barman-cloud v0.5.1
|
||||
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260513095406-dac43abc6cf6
|
||||
github.com/cloudnative-pg/cloudnative-pg v1.29.0
|
||||
github.com/cloudnative-pg/cnpg-i v0.5.0
|
||||
github.com/cloudnative-pg/cnpg-i-machinery v0.4.2
|
||||
@ -116,7 +116,7 @@ require (
|
||||
golang.org/x/net v0.53.0 // indirect
|
||||
golang.org/x/oauth2 v0.36.0 // indirect
|
||||
golang.org/x/sync v0.20.0 // indirect
|
||||
golang.org/x/sys v0.43.0 // indirect
|
||||
golang.org/x/sys v0.44.0 // indirect
|
||||
golang.org/x/term v0.42.0 // indirect
|
||||
golang.org/x/text v0.36.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
|
||||
8
go.sum
8
go.sum
@ -20,8 +20,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cloudnative-pg/api v1.29.0 h1:mNx6yJ5qi+Xrjs0NYrUy6V4MlXBkVJxGKwvTJZIuTX4=
|
||||
github.com/cloudnative-pg/api v1.29.0/go.mod h1:bF3HI8UVVcllZ7M8CfBufnb+Us8FyQArhD+4qtX0qhM=
|
||||
github.com/cloudnative-pg/barman-cloud v0.5.1 h1:vjkXrrxo2DQXHT9u9usqhtaHiPZ/lTfDVs/pIWYTepQ=
|
||||
github.com/cloudnative-pg/barman-cloud v0.5.1/go.mod h1:XPc5IUFP1y4cZX1sg+Pd8j9V4tmUEVnv3BGCpfQOOg8=
|
||||
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260513095406-dac43abc6cf6 h1:FxIX5u8Kf1aJQnmW/5eRo+1hx/okApecnIJAmvliaJ8=
|
||||
github.com/cloudnative-pg/barman-cloud v0.5.2-0.20260513095406-dac43abc6cf6/go.mod h1:VrubJGTgO94O2+m4EX68/wlbDmluc6ITL/VjTcMN3H4=
|
||||
github.com/cloudnative-pg/cloudnative-pg v1.29.0 h1:49Dm8+y4va7RODspJjeaK8uMWP3OGAD0gMsxhjm16Mo=
|
||||
github.com/cloudnative-pg/cloudnative-pg v1.29.0/go.mod h1:0Sgb/50VyaCnQm3IbWqgnhQG8Kb6mgqo8Jo1J+KtkSI=
|
||||
github.com/cloudnative-pg/cnpg-i v0.5.0 h1:/TOzpNT6cwNgrpftTtrnLKdoHgMwd+88vZgXjlVgXeE=
|
||||
@ -275,8 +275,8 @@ golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
|
||||
golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q=
|
||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI=
|
||||
golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
|
||||
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY=
|
||||
golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY=
|
||||
golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg=
|
||||
|
||||
@ -181,6 +181,9 @@ func (impl JobHookImpl) restoreDataDir(
|
||||
if backup.Status.EndpointURL != "" {
|
||||
options = append(options, "--endpoint-url", backup.Status.EndpointURL)
|
||||
}
|
||||
|
||||
options = barmanConfiguration.Data.AppendRestoreAdditionalCommandArgs(options)
|
||||
|
||||
options = append(options, backup.Status.DestinationPath)
|
||||
options = append(options, backup.Status.ServerName)
|
||||
options = append(options, backup.Status.BackupID)
|
||||
|
||||
@ -175,6 +175,25 @@ spec:
|
||||
format: int32
|
||||
minimum: 1
|
||||
type: integer
|
||||
restoreAdditionalCommandArgs:
|
||||
description: |-
|
||||
Additional arguments that can be appended to the 'barman-cloud-restore'
|
||||
command-line invocation. These arguments provide flexibility to customize
|
||||
the data restore process further, according to specific requirements or
|
||||
configurations.
|
||||
|
||||
Example:
|
||||
In a scenario where specialized restore options are required, such as setting
|
||||
a specific read timeout or defining custom behavior, users can use this field
|
||||
to specify additional command arguments.
|
||||
|
||||
Note:
|
||||
It's essential to ensure that the provided arguments are valid and supported
|
||||
by the 'barman-cloud-restore' command, to avoid potential errors or unintended
|
||||
behavior during execution.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
destinationPath:
|
||||
description: |-
|
||||
|
||||
@ -32,14 +32,16 @@ spec:
|
||||
[...]
|
||||
```
|
||||
|
||||
## Extra Options for Backup and WAL Archiving
|
||||
## Extra Options for Backup, WAL Archiving, and Restore
|
||||
|
||||
You can pass additional command-line arguments to `barman-cloud-backup` and
|
||||
`barman-cloud-wal-archive` using the `additionalCommandArgs` field in the
|
||||
`ObjectStore` configuration.
|
||||
You can pass additional command-line arguments to the underlying
|
||||
`barman-cloud-*` commands using the corresponding fields in the `ObjectStore`
|
||||
configuration.
|
||||
|
||||
- `.spec.configuration.data.additionalCommandArgs`: for `barman-cloud-backup`
|
||||
- `.spec.configuration.data.restoreAdditionalCommandArgs`: for `barman-cloud-restore`
|
||||
- `.spec.configuration.wal.archiveAdditionalCommandArgs`: for `barman-cloud-wal-archive`
|
||||
- `.spec.configuration.wal.restoreAdditionalCommandArgs`: for `barman-cloud-wal-restore`
|
||||
|
||||
Each field accepts a list of string arguments. If an argument is already
|
||||
configured elsewhere in the plugin, the duplicate will be ignored.
|
||||
@ -58,6 +60,19 @@ spec:
|
||||
- "--read-timeout=60"
|
||||
```
|
||||
|
||||
### Example: Extra Restore Options
|
||||
|
||||
```yaml
|
||||
kind: ObjectStore
|
||||
metadata:
|
||||
name: my-store
|
||||
spec:
|
||||
configuration:
|
||||
data:
|
||||
restoreAdditionalCommandArgs:
|
||||
- "--read-timeout=900"
|
||||
```
|
||||
|
||||
### Example: Extra WAL Archive Options
|
||||
|
||||
```yaml
|
||||
@ -72,6 +87,19 @@ spec:
|
||||
- "--read-timeout=60"
|
||||
```
|
||||
|
||||
### Example: Extra WAL Restore Options
|
||||
|
||||
```yaml
|
||||
kind: ObjectStore
|
||||
metadata:
|
||||
name: my-store
|
||||
spec:
|
||||
configuration:
|
||||
wal:
|
||||
restoreAdditionalCommandArgs:
|
||||
- "--read-timeout=60"
|
||||
```
|
||||
|
||||
For a complete list of supported options, refer to the
|
||||
[official Barman Cloud documentation](https://docs.pgbarman.org/release/latest/).
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user