diff --git a/docs/source/sctool/partials/sctool_backup.yaml b/docs/source/sctool/partials/sctool_backup.yaml index 1da58e4c4..95eb30762 100644 --- a/docs/source/sctool/partials/sctool_backup.yaml +++ b/docs/source/sctool/partials/sctool_backup.yaml @@ -159,6 +159,11 @@ options: usage: | Timezone of --cron and --window flag values. The default value is taken from this system, namely 'TZ' envvar or '/etc/localtime' file. + - name: transfers + default_value: "-1" + usage: | + Sets the amount of file transfers to run in parallel when uploading files from a Scylla node to its backup location. + Set to -1 for using the transfers value defined in node's 'scylla-manager-agent.yaml' config file. - name: upload-parallel default_value: '[]' usage: | diff --git a/docs/source/sctool/partials/sctool_backup_update.yaml b/docs/source/sctool/partials/sctool_backup_update.yaml index 611b60b4a..d9ad5174f 100644 --- a/docs/source/sctool/partials/sctool_backup_update.yaml +++ b/docs/source/sctool/partials/sctool_backup_update.yaml @@ -160,6 +160,11 @@ options: usage: | Timezone of --cron and --window flag values. The default value is taken from this system, namely 'TZ' envvar or '/etc/localtime' file. + - name: transfers + default_value: "-1" + usage: | + Sets the amount of file transfers to run in parallel when uploading files from a Scylla node to its backup location. + Set to -1 for using the transfers value defined in node's 'scylla-manager-agent.yaml' config file. - name: upload-parallel default_value: '[]' usage: | diff --git a/pkg/command/backup/cmd.go b/pkg/command/backup/cmd.go index f091e005e..18362fb87 100644 --- a/pkg/command/backup/cmd.go +++ b/pkg/command/backup/cmd.go @@ -32,6 +32,7 @@ type command struct { retention int retentionDays int rateLimit []string + transfers int snapshotParallel []string uploadParallel []string dryRun bool @@ -84,6 +85,7 @@ func (cmd *command) init() { w.Unwrap().IntVar(&cmd.retention, "retention", 7, "") w.Unwrap().IntVar(&cmd.retentionDays, "retention-days", 0, "") w.Unwrap().StringSliceVar(&cmd.rateLimit, "rate-limit", nil, "") + w.Unwrap().IntVar(&cmd.transfers, "transfers", -1, "") w.Unwrap().StringSliceVar(&cmd.snapshotParallel, "snapshot-parallel", nil, "") w.Unwrap().StringSliceVar(&cmd.uploadParallel, "upload-parallel", nil, "") w.Unwrap().BoolVar(&cmd.dryRun, "dry-run", false, "") @@ -144,6 +146,10 @@ func (cmd *command) run(args []string) error { props["rate_limit"] = cmd.rateLimit ok = true } + if cmd.Flag("transfers").Changed { + props["transfers"] = cmd.transfers + ok = true + } if cmd.Flag("snapshot-parallel").Changed { props["snapshot_parallel"] = cmd.snapshotParallel ok = true diff --git a/pkg/command/backup/res.yaml b/pkg/command/backup/res.yaml index 92021520b..f774163b0 100644 --- a/pkg/command/backup/res.yaml +++ b/pkg/command/backup/res.yaml @@ -19,6 +19,10 @@ rate-limit: | The : part is optional and is only needed when different datacenters require different upload limits. Set to 0 for no limit (default 100). +transfers: | + Sets the amount of file transfers to run in parallel when uploading files from a Scylla node to its backup location. + Set to -1 for using the transfers value defined in node's 'scylla-manager-agent.yaml' config file. + snapshot-parallel: | A comma-separated list of snapshot parallelism limits in the format `[:]`. The ``dc`` part is optional and allows for specifying different limits in selected datacenters.