diff --git a/src/internal/m365/backup.go b/src/internal/m365/backup.go index a09b11b0e..10e29dab1 100644 --- a/src/internal/m365/backup.go +++ b/src/internal/m365/backup.go @@ -46,8 +46,6 @@ func (ctrl *Controller) ProduceBackupCollections( diagnostics.Index("service", bpc.Selector.PathService().String())) defer end() - ctx = graph.BindRateLimiterConfig(ctx, graph.LimiterCfg{Service: service}) - // Limit the max number of active requests to graph from this collection. bpc.Options.Parallelism.ItemFetch = graph.Parallelism(service). ItemOverride(ctx, bpc.Options.Parallelism.ItemFetch) diff --git a/src/internal/m365/collection/drive/collection.go b/src/internal/m365/collection/drive/collection.go index 00f99abe2..d06859450 100644 --- a/src/internal/m365/collection/drive/collection.go +++ b/src/internal/m365/collection/drive/collection.go @@ -587,14 +587,6 @@ func (oc *Collection) streamDriveItem( parentPath) ctx = clues.Add(ctx, "item_info", itemInfo) - // Drive content download requests are also rate limited by graph api. - // Ensure that this request goes through the drive limiter & not the default - // limiter. - ctx = graph.BindRateLimiterConfig( - ctx, - graph.LimiterCfg{ - Service: path.OneDriveService, - }) if isFile { dataSuffix := metadata.DataFileSuffix diff --git a/src/internal/operations/backup.go b/src/internal/operations/backup.go index e6e5a5490..4b9699e7a 100644 --- a/src/internal/operations/backup.go +++ b/src/internal/operations/backup.go @@ -205,6 +205,13 @@ func (op *BackupOperation) Run(ctx context.Context) (err error) { ctx = clues.AddTrace(ctx) + // Select an appropriate rate limiter for the service. + ctx = graph.BindRateLimiterConfig( + ctx, + graph.LimiterCfg{ + Service: op.Selectors.PathService(), + }) + // Check if the protected resource has the service enabled in order for us // to run a backup. enabled, err := op.bp.IsServiceEnabled(