backups: fix app restore with tgz

This commit is contained in:
Girish Ramakrishnan
2025-07-25 12:55:14 +02:00
parent 83ab701d02
commit fc4da4408c
5 changed files with 43 additions and 32 deletions
+2 -2
View File
@@ -223,8 +223,8 @@ async function startBoxUpdateTask(options, auditSource) {
const [error] = await safe(locks.acquire(locks.TYPE_BOX_UPDATE_TASK));
if (error) throw new BoxError(BoxError.BAD_STATE, `Another update task is in progress: ${error.message}`);
const backupConfig = await backupTargets.getConfig();
const memoryLimit = backupConfig.limits?.memoryLimit ? Math.max(backupConfig.limits.memoryLimit/1024/1024, 400) : 400;
const backupTarget = await backupTargets.getPrimary();
const memoryLimit = backupTarget.limits?.memoryLimit ? Math.max(backupTarget.limits.memoryLimit/1024/1024, 400) : 400;
const taskId = await tasks.add(tasks.TASK_BOX_UPDATE, [ boxUpdateInfo, options ]);
await eventlog.add(eventlog.ACTION_UPDATE, auditSource, { taskId, boxUpdateInfo });