diff --git a/CHANGELOG.md b/CHANGELOG.md index f4f9baf89..905f44514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - OneDrive item downloads that return 404 during backup (normally due to external deletion while Corso processes) are now skipped instead of quietly dropped. These items will appear in the skipped list alongside other skipped cases such as malware detection. - Listing a single backup by id will also list the skipped and failed items that occurred during the backup. These can be filtered out with the flags `--failed-items hide`, `--skipped-items hide`, and `--recovered-errors hide`. - Enable incremental backups for OneDrive if permissions aren't being backed up. +- Hidden flag to control parallelism for fetching Exchange items (`--fetch-parallelism`). May help reduce `ApplicationThrottled` errors but will slow down backup. ### Fixed - Fix repo connect not working without a config file diff --git a/src/cli/backup/exchange.go b/src/cli/backup/exchange.go index b1da988ba..2d91e06b8 100644 --- a/src/cli/backup/exchange.go +++ b/src/cli/backup/exchange.go @@ -117,6 +117,7 @@ func addExchangeCommands(cmd *cobra.Command) *cobra.Command { &exchangeData, utils.DataFN, nil, "Select one or more types of data to backup: "+dataEmail+", "+dataContacts+", or "+dataEvents) + options.AddFetchParallelismFlag(c) options.AddOperationFlags(c) case listCommand: diff --git a/src/cli/options/options.go b/src/cli/options/options.go index 2aeb53ea8..d9bdd08c1 100644 --- a/src/cli/options/options.go +++ b/src/cli/options/options.go @@ -17,6 +17,7 @@ func Control() control.Options { opt.SkipReduce = skipReduce opt.ToggleFeatures.DisableIncrementals = disableIncrementals opt.ToggleFeatures.EnablePermissionsBackup = enablePermissionsBackup + opt.ItemFetchParallelism = fetchParallelism return opt } @@ -30,6 +31,7 @@ var ( noStats bool restorePermissions bool skipReduce bool + fetchParallelism int ) // AddOperationFlags adds command-local operation flags @@ -62,6 +64,16 @@ func AddSkipReduceFlag(cmd *cobra.Command) { cobra.CheckErr(fs.MarkHidden("skip-reduce")) } +func AddFetchParallelismFlag(cmd *cobra.Command) { + fs := cmd.Flags() + fs.IntVar( + &fetchParallelism, + "fetch-parallelism", + 4, + "Control the number of concurrent data fetches for Exchange. Valid range is [1-4]. Default: 4") + cobra.CheckErr(fs.MarkHidden("fetch-parallelism")) +} + // --------------------------------------------------------------------------- // Feature Flags // --------------------------------------------------------------------------- @@ -82,7 +94,7 @@ func AddFeatureToggle(cmd *cobra.Command, effs ...exposeFeatureFlag) { } } -// Adds the hidden '--no-incrementals' cli flag which, when set, disables +// Adds the hidden '--disable-incrementals' cli flag which, when set, disables // incremental backups. func DisableIncrementals() func(*pflag.FlagSet) { return func(fs *pflag.FlagSet) {