/** * v2.1 Phase 4c.3: re-export the DB-layer constant under the historical * `SCHEMA_VERSION` name so existing callers (tests/backup.test.ts, docs) * keep working. New code should import `CURRENT_SCHEMA_VERSION` directly * from src/db.ts. */ export declare const SCHEMA_VERSION = 24; /** Bump on any breaking change to the tar layout (files, manifest structure). */ export declare const ARCHIVE_FORMAT_VERSION = 1; export interface ExportResult { archive_path: string; schema_version: number; row_counts: Record; bytes: number; } export interface ManifestFile { schema_version: number; archive_format_version: number; created_at: string; relay_version: string; row_counts: Record; } interface ExportOptions { /** Override the destination path. Defaults to ~/.bot-relay/backups/relay-backup-.tar.gz */ destinationPath?: string; } /** * Produce a consistent snapshot of the current relay DB and config at * `destinationPath` (tar.gz). Opens its own read-only connection to the source * DB so it is safe to call while the relay daemon is running. */ export declare function exportRelayState(options?: ExportOptions): Promise; export interface ImportResult { restored: true; schema_version: number; archive_format_version: number; previous_backup_path: string; row_counts: Record; } interface ImportOptions { /** Bypass schema-version-lower and daemon-running refusals. */ force?: boolean; } /** * Restore relay state from an archive. Always safety-backs-up the current * DB first; if that safety-backup fails the import aborts and the current * DB is left untouched. */ export declare function importRelayState(archivePath: string, options?: ImportOptions): Promise; export {}; //# sourceMappingURL=backup.d.ts.map