export interface BackupDatabaseOptions { /** Why this backup is being taken (e.g. "pre-migration", "daily"). Debounce and retention are tracked per reason. */ reason: string; /** How many backups to retain per reason (newest first). */ keep?: number; /** Source database file; defaults to the live store path. Tests must pass a temp path. */ dbFile?: string; /** Directory for backup files; defaults to `/backups`. */ backupsDir?: string; /** Injectable clock for tests. */ now?: Date; } export interface BackupDatabaseResult { /** Absolute path of the backup that was written (absent when skipped). */ path?: string; skipped: boolean; skipReason?: string; /** Backups removed by retention pruning. */ prunedPaths: string[]; } /** * Snapshot the loops database with `VACUUM INTO`. Per-reason backups are * debounced to at most one per hour and pruned to the `keep` most recent. */ export declare function backupDatabase(opts: BackupDatabaseOptions): BackupDatabaseResult;