@hivetechs/hive-ai
Version:
Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API
124 lines • 3.44 kB
TypeScript
/**
* Backup Location Manager - Flexible Backup Destination Management
*
* Features:
* - Default local backup location
* - User-configurable backup destinations
* - Cloud storage folder integration (OneDrive, iCloud, Dropbox, Google Drive)
* - Multiple backup destinations with sync
* - Path validation and availability checking
* - Cross-platform path handling
*/
export interface BackupLocation {
name: string;
path: string;
type: 'local' | 'cloud_sync' | 'network';
cloud_provider?: 'onedrive' | 'icloud' | 'dropbox' | 'google_drive' | 'other';
enabled: boolean;
priority: number;
auto_sync: boolean;
last_verified: string;
available: boolean;
free_space_gb?: number;
}
export interface BackupLocationConfig {
default_location: string;
locations: BackupLocation[];
sync_enabled: boolean;
verification_interval_hours: number;
max_locations: number;
require_primary_available: boolean;
}
export declare class BackupLocationManager {
private config;
private defaultBackupPath;
constructor();
/**
* Initialize the backup location manager
*/
private initialize;
/**
* Load configuration from unified database or create default
*/
private loadConfig;
/**
* Create default configuration with smart cloud detection
*/
private createDefaultConfig;
/**
* Detect common cloud storage paths across platforms
*/
private detectCloudStoragePaths;
/**
* Verify if a path is actually a cloud sync folder
*/
private verifyCloudSyncFolder;
/**
* Initialize default backup location
*/
private initializeDefaultLocation;
/**
* Add a new backup location
*/
addBackupLocation(location: Omit<BackupLocation, 'last_verified' | 'available'>): Promise<{
success: boolean;
error?: string;
location?: BackupLocation;
}>;
/**
* Remove a backup location
*/
removeBackupLocation(locationName: string): Promise<{
success: boolean;
error?: string;
}>;
/**
* Get all backup locations with current status
*/
getBackupLocations(): Promise<BackupLocation[]>;
/**
* Get available backup locations for writing
*/
getAvailableLocations(): Promise<BackupLocation[]>;
/**
* Get primary backup location
*/
getPrimaryLocation(): Promise<BackupLocation | null>;
/**
* Update backup location settings
*/
updateLocationSettings(locationName: string, updates: Partial<BackupLocation>): Promise<{
success: boolean;
error?: string;
}>;
/**
* Validate a backup location path
*/
private validateLocation;
/**
* Create backup directory structure at location
*/
private createBackupStructure;
/**
* Save configuration to unified database
*/
private saveConfig;
/**
* Validate configuration integrity
*/
private validateConfig;
/**
* Get configuration for external access
*/
getConfig(): BackupLocationConfig;
/**
* Sync backups across all enabled locations
*/
syncBackupsAcrossLocations(backupFileName: string): Promise<{
success: boolean;
synced_locations: string[];
failed_locations: string[];
errors: string[];
}>;
}
//# sourceMappingURL=backup-location-manager.d.ts.map