/** * Backup utilities for AgenShield installation * * Saves installation state before migration to enable safe uninstall. * Backup is stored in /etc/agenshield/backup.json (root-owned, mode 600). */ import type { InstallationBackup, OriginalInstallation, SandboxUserInfo, MigratedPaths } from '@agenshield/ipc'; export interface SaveBackupParams { originalInstallation: OriginalInstallation; sandboxUser: SandboxUserInfo; migratedPaths: MigratedPaths; } /** * Save installation backup before migration */ export declare function saveBackup(params: SaveBackupParams): { success: boolean; error?: string; }; /** * Load installation backup * Returns null if no backup exists or if read fails */ export declare function loadBackup(): InstallationBackup | null; /** * Check if a backup exists */ export declare function backupExists(): boolean; /** * Delete the backup file (called after successful uninstall) */ export declare function deleteBackup(): { success: boolean; error?: string; }; /** * @deprecated No longer used — migration is now non-destructive (read-only copy). * The original config directory is never touched. Kept for backward compatibility. */ export declare function backupOriginalConfig(_configPath: string): { success: boolean; backupPath?: string; error?: string; }; /** * Restore the original config from backup * Used during uninstall to restore the original config */ export declare function restoreOriginalConfig(backupPath: string, targetPath: string): { success: boolean; error?: string; }; //# sourceMappingURL=backup.d.ts.map