backup_restore
Create timestamped backups, restore files, and manage backup lifecycle with metadata tracking and automated cleanup for data protection.
Instructions
๐พ Enhanced backup management - Timestamped backup tracking with metadata, restore capability, and intelligent cleanup. Extends existing backup patterns with enterprise-grade management.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| backup_id | No | ||
| cleanup_options | No | ||
| file_path | No | ||
| metadata | No |
Input Schema (JSON Schema)
{
"properties": {
"action": {
"enum": [
"create",
"restore",
"list",
"cleanup"
],
"type": "string"
},
"backup_id": {
"type": "string"
},
"cleanup_options": {
"properties": {
"dry_run": {
"default": false,
"type": "boolean"
},
"max_age_days": {
"default": 30,
"type": "number"
},
"max_count_per_file": {
"default": 10,
"type": "number"
}
},
"type": "object"
},
"file_path": {
"type": "string"
},
"metadata": {
"properties": {
"description": {
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"required": [
"action"
],
"type": "object"
}
Implementation Reference
- smart-ai-bridge-v1.1.0.js:1029-1031 (handler)Top-level handler method for the backup_restore tool. Delegates to FileModificationManager.orchestrateOperation with operation type 'backup_restore'.async handleBackupRestore(args) { return await this.fileManager.orchestrateOperation('backup_restore', args); }
- smart-ai-bridge-v1.1.0.js:432-457 (schema)Input schema for backup_restore tool defining parameters like action (create/restore/list/cleanup), file_path, backup_id, metadata, and cleanup_options.schema: { type: 'object', properties: { action: { type: 'string', enum: ['create', 'restore', 'list', 'cleanup'] }, file_path: { type: 'string' }, backup_id: { type: 'string' }, metadata: { type: 'object', properties: { description: { type: 'string' }, tags: { type: 'array', items: { type: 'string' } } } }, cleanup_options: { type: 'object', properties: { max_age_days: { type: 'number', default: 30 }, max_count_per_file: { type: 'number', default: 10 }, dry_run: { type: 'boolean', default: false } } } }, required: ['action']
- smart-ai-bridge-v1.1.0.js:429-458 (registration)Registration of backup_restore tool in coreToolDefinitions array of SmartAliasResolver, linking name to handler 'handleBackupRestore' and including schema.name: 'backup_restore', description: '๐พ Enhanced backup management - Timestamped backup tracking with metadata, restore capability, and intelligent cleanup. Extends existing backup patterns with enterprise-grade management.', handler: 'handleBackupRestore', schema: { type: 'object', properties: { action: { type: 'string', enum: ['create', 'restore', 'list', 'cleanup'] }, file_path: { type: 'string' }, backup_id: { type: 'string' }, metadata: { type: 'object', properties: { description: { type: 'string' }, tags: { type: 'array', items: { type: 'string' } } } }, cleanup_options: { type: 'object', properties: { max_age_days: { type: 'number', default: 30 }, max_count_per_file: { type: 'number', default: 10 }, dry_run: { type: 'boolean', default: false } } } }, required: ['action'] }
- smart-ai-bridge-v1.1.0.js:709-716 (helper)In FileModificationManager.orchestrateOperation switch statement, handles 'backup_restore' by invoking router.performBackupRestore with parameters.case 'backup_restore': result = await this.router.performBackupRestore( params.action, params.file_path, params.backup_id, params.metadata, params.cleanup_options );
- smart-ai-bridge-v1.1.0.js:821-823 (handler)Core implementation method in MultiAIRouter for performing backup/restore actions (currently a placeholder returning success). Called by orchestrateOperation.async performBackupRestore(action, filePath, backupId, metadata, cleanupOptions) { // Placeholder implementation return { success: true, action };