From 43ddbbcf722812cd32dd73211745bf39bd507554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20X=2E=20F=C3=BCrst?= Date: Fri, 5 Jun 2026 16:16:58 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20lokalen=20Dump=20nach=20erfolgreichem?= =?UTF-8?q?=20Upload=20l=C3=B6schen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- lib/backup.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/backup.ts b/lib/backup.ts index c787cdf..3df4c9d 100644 --- a/lib/backup.ts +++ b/lib/backup.ts @@ -1,4 +1,4 @@ -import { createWriteStream, mkdirSync } from 'fs'; +import { createWriteStream, mkdirSync, unlinkSync } from 'fs'; import { createGzip } from 'zlib'; import { join } from 'path'; import { spawn } from 'child_process'; @@ -115,6 +115,7 @@ async function runBackup(): Promise { ); }); + unlinkSync(localPath); console.log(`[backup] ${filename} → ${sshHost}:${remotePath}`); // Backups älter als 30 Tage auf Remote löschen