From f8f4e312ae6110f933e3258ffeb10d8df8f59f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A9=20Havard?= Date: Tue, 11 Aug 2026 12:25:30 +0200 Subject: [PATCH 1/4] Add MAX_CONCURRENT_UPLOADS constant to controller --- .../Api/Remote/Backups/BackupRemoteUploadController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php b/app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php index be9842a07e..1abbce4e09 100644 --- a/app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php +++ b/app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php @@ -22,6 +22,8 @@ class BackupRemoteUploadController extends Controller public const MAX_MAX_PART_SIZE = 5 * 1024 * 1024 * 1024; // 5 GiB + public const MAX_CONCURRENT_UPLOADS = 10; + /** * BackupRemoteUploadController constructor. */ From 92a4c2edc888ee1cbfa99464ac6160e30460b67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A9=20Havard?= Date: Tue, 11 Aug 2026 13:01:33 +0200 Subject: [PATCH 2/4] Add max concurrent uploads setting for S3 backups --- config/backups.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/backups.php b/config/backups.php index 5fd46734fc..804fcd536d 100644 --- a/config/backups.php +++ b/config/backups.php @@ -16,6 +16,14 @@ // to 6 hours. To disable this feature, set the value to `0`. 'prune_age' => (int) env('BACKUP_PRUNE_AGE', 360), + // This value defines the maximum amount of concurrent requests PER BACKUP for S3 uploads + // The default value is 10. + // This value is not guaranteed to be reached (for instance, if there are fewer parts). + // If multiple backups are being uploaded to S3 at the same time, each backup may have up to this limit of concurrent uploads. + 'max_concurrent_uploads' => (int) env('BACKUP_MAX_CONCURRENT_UPLOADS', BackupRemoteUploadController::MAX_CONCURRENT_UPLOADS), + + + // Defines the backup creation throttle limits for users. In this default example, we allow // a user to create two (successful or pending) backups per 10 minutes. Even if they delete // a backup it will be included in the throttle count. From 5cb8ea383944f766e26a0a18874d9ffca83777a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A9=20Havard?= Date: Tue, 11 Aug 2026 13:03:42 +0200 Subject: [PATCH 3/4] Add maxConcurrentUploads to S3BackupSchema This will be send to Wings when generating new backup --- app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php b/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php index fb04a21ecb..e5d85e2e98 100644 --- a/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php +++ b/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php @@ -141,12 +141,15 @@ public function getUploadParts(Backup $backup, int $size): array )->getUri()->__toString(); } + $maxConcurrentUploads = config('backups.max_concurrent_uploads', BackupRemoteUploadController::MAX_CONCURRENT_UPLOADS); + // Set the upload_id on the backup in the database. $backup->update(['upload_id' => $params['UploadId']]); return [ 'parts' => $parts, 'part_size' => $maxPartSize, + 'max_concurrent_uploads' => $maxConcurrentUploads ]; } From cac5562c5390ed9eaa9a568815910af473661bf1 Mon Sep 17 00:00:00 2001 From: barna Date: Wed, 19 Aug 2026 19:27:25 +0200 Subject: [PATCH 4/4] Fixed code style issues --- app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php | 2 +- config/backups.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php b/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php index e5d85e2e98..2081c12cdc 100644 --- a/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php +++ b/app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php @@ -149,7 +149,7 @@ public function getUploadParts(Backup $backup, int $size): array return [ 'parts' => $parts, 'part_size' => $maxPartSize, - 'max_concurrent_uploads' => $maxConcurrentUploads + 'max_concurrent_uploads' => $maxConcurrentUploads, ]; } diff --git a/config/backups.php b/config/backups.php index 804fcd536d..a1bf1e2772 100644 --- a/config/backups.php +++ b/config/backups.php @@ -17,13 +17,11 @@ 'prune_age' => (int) env('BACKUP_PRUNE_AGE', 360), // This value defines the maximum amount of concurrent requests PER BACKUP for S3 uploads - // The default value is 10. + // The default value is 10. // This value is not guaranteed to be reached (for instance, if there are fewer parts). // If multiple backups are being uploaded to S3 at the same time, each backup may have up to this limit of concurrent uploads. 'max_concurrent_uploads' => (int) env('BACKUP_MAX_CONCURRENT_UPLOADS', BackupRemoteUploadController::MAX_CONCURRENT_UPLOADS), - - // Defines the backup creation throttle limits for users. In this default example, we allow // a user to create two (successful or pending) backups per 10 minutes. Even if they delete // a backup it will be included in the throttle count.