Cleanup Old Backups
cleanup_backupsDeletes older backup files, retaining a specified number of recent backups to reduce clutter and reclaim storage. Preview existing backups before deletion.
Instructions
Delete old backup files, keeping only the most recent N backups. Use list_backups to preview before cleanup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep_count | No | Number of most recent backups to keep (default: 5). Anti-Hallucination Hint: You can pass a string or number, or use positional args: mj.backup.cleanupBackups(5). | |
| use_test_db | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Error code (e.g. VALIDATION_ERROR, INTERNAL_ERROR) | |
| error | No | Human-readable error message | |
| deleted | No | ||
| details | No | Additional error context | |
| message | No | ||
| success | Yes | ||
| category | No | Error category (validation, query, connection, internal) | |
| keptCount | No | ||
| suggestion | No | Suggested fix for the error | |
| recoverable | No | Whether the error is recoverable | |
| deletedCount | No | ||
| aggregated_errors | No | Details of individual errors in a multi-step operation |