feat: automate verified SQLite backups and safe recovery
This commit is contained in:
5
scripts/restore.ts
Normal file
5
scripts/restore.ts
Normal 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.`);
|
||||
Reference in New Issue
Block a user