mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: limit upload speed during backups
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user