/** * Backup Utilities * * Provides backup creation and restoration functionality * Uses tar.gz format for compressed backups */ /** * Backup metadata stored in the archive */ export interface BackupMetadata { created: string; version: string; description?: string; sourceDir: string; fileCount: number; totalSize: number; } /** * Options for creating a backup */ export interface BackupOptions { description?: string; include?: string[]; exclude?: string[]; followSymlinks?: boolean; onProgress?: (current: number, total: number, filename: string) => void; } /** * Result of backup creation */ export interface BackupResult { path: string; metadata: BackupMetadata; compressedSize: number; } /** * Options for restoring a backup */ export interface RestoreOptions { overwrite?: boolean; backupCurrent?: boolean; onProgress?: (current: number, total: number, filename: string) => void; } /** * Generate a backup filename with timestamp */ export declare function generateBackupFilename(prefix?: string): string; /** * Create a backup of a directory */ export declare function createBackup(sourceDir: string, outputPath: string, options?: BackupOptions): Promise; /** * Create a simple backup by copying files * Useful for quick backups without compression */ export declare function createSimpleBackup(sourceDir: string, outputDir: string, options?: { suffix?: string; }): Promise; /** * Restore a backup to a directory */ export declare function restoreBackup(backupPath: string, targetDir: string, options?: RestoreOptions): Promise<{ restoredFiles: number; }>; /** * List contents of a backup without extracting */ export declare function listBackupContents(backupPath: string): Promise; /** * Move a file to a backup location (rename with timestamp) */ export declare function backupFile(filePath: string, backupDir?: string): Promise; /** * Rotate backups, keeping only the N most recent */ export declare function rotateBackups(backupDir: string, pattern: RegExp, keepCount: number): Promise; /** * Get backup info from a tar.gz file */ export declare function getBackupInfo(backupPath: string): Promise<{ fileCount: number; compressedSize: number; files: string[]; }>; //# sourceMappingURL=backup.d.ts.map