Skip to content

Can't pass AdditionalCommandArgs to barman-cloud-restore #821

@an-tex

Description

@an-tex

you can pass custom command line arguments to the backup and wal-restore commands but not to barman-cloud-restore.

default options are pulled in from barmanCommand.AppendCloudProviderOptionsFromConfiguration and then some custom ones are added.

	var options []string

	options, err := barmanCommand.AppendCloudProviderOptionsFromConfiguration(ctx, options, barmanConfiguration)
	if err != nil {
		return err
	}

	if backup.Status.EndpointURL != "" {
		options = append(options, "--endpoint-url", backup.Status.EndpointURL)
	}
	options = append(options, backup.Status.DestinationPath)
	options = append(options, backup.Status.ServerName)
	options = append(options, backup.Status.BackupID)
	options = append(options, impl.PgDataPath)

	log.Info("Starting barman-cloud-restore",
		"options", options)

but neither is taking e.g. /spec/configuration/data/additionalCommandArgs/ or other appropriate keys into account.

in our case I'd like to pass a custom read timeout

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions