feat: automate verified SQLite backups and safe recovery

This commit is contained in:
syntaxbullet
2026-09-04 18:28:28 +02:00
parent 32002151e0
commit 661bc6c346
10 changed files with 227 additions and 2 deletions

5
scripts/restore.ts Normal file
View File

@@ -0,0 +1,5 @@
import { resolve } from "node:path";
import { restoreBackup } from "../src/ops/backups";
const [source, destination] = process.argv.slice(2);
if (!source || !destination || process.argv.length !== 4) throw new Error("Usage: bun scripts/restore.ts BACKUP NEW_DATABASE_PATH");
console.log(`Restored and verified: ${restoreBackup(resolve(source), resolve(destination))}. All sessions revoked.`);