Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/Extensions/BackupAdapter/Schemas/S3BackupSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 6 additions & 0 deletions config/backups.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
// 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.
Expand Down
Loading