Restore Journal from Backup
restore_backupRestores the journal database from a backup file, replacing all current data. An automatic backup is created first to protect existing journal contents.
Instructions
Restore the journal database from a backup file. WARNING: This replaces all current data. Enforce single-writer / single-instance only for restore-capable deployments. An automatic backup is created before restore.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must be set to true to confirm the restore operation | |
| filename | No | Backup filename to restore from (e.g., backup_2025-01-01.db). Anti-Hallucination Hint: Property is strictly `filename`, not `file`. You can pass positional args: mj.backup.restoreBackup("filename.db", true). | |
| 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 | |
| details | No | Additional error context | |
| message | No | ||
| success | Yes | ||
| warning | No | ||
| category | No | Error category (validation, query, connection, internal) | |
| suggestion | No | Suggested fix for the error | |
| recoverable | No | Whether the error is recoverable | |
| restoredFrom | No | ||
| newEntryCount | No | ||
| revertedChanges | No | ||
| aggregated_errors | No | Details of individual errors in a multi-step operation | |
| previousEntryCount | No |