feat: limit upload speed during backups

This commit is contained in:
Nicolas Meienberger
2025-11-22 11:03:57 +01:00
parent 043f73ea87
commit 8ccece42f0
11 changed files with 661 additions and 87 deletions

View File

@@ -234,6 +234,7 @@ const backup = async (
exclude?: string[];
include?: string[];
tags?: string[];
limitUploadKbps?: number | null;
signal?: AbortSignal;
onProgress?: (progress: BackupProgress) => void;
},
@@ -243,6 +244,10 @@ const backup = async (
const args: string[] = ["--repo", repoUrl, "backup", "--one-file-system"];
if (options?.limitUploadKbps) {
args.push("--limit-upload", String(options.limitUploadKbps));
}
if (options?.tags && options.tags.length > 0) {
for (const tag of options.tags) {
args.push("--tag", tag);