Preface¶
The core philosophy of DeepSeek Harness is “everything is a plugin.” When developing agents or conducting deep dialogues, workspace configurations, complete conversation histories, attachments, and dsh-mnemon memory data are often stored in scattered locations. When switching machines, reinstalling, or upgrading systems, restoring these states requires manual intervention or reliance on different plugins, making it prone to omissions. having5548/dsh-backup solves this problem by packaging the aforementioned data into a single ZIP file, providing one-click backup and restore capabilities.
Core Capabilities¶
This plugin provides the following features:
* Full Packaging: Includes the workspace registry, complete conversations (byte-level fidelity, no unpacking or rewriting), attachments, settings, and mnemon memory data.
* Bidirectional Compatibility: Supports automatic migration of old-version sessions; future new-version harness sessions can also be loaded into the current backup.
* Import Modes: Provides two modes—Merge (fill missing items without overwriting) and Overwrite (full replacement)—with pre-import checks supported.
* Automatic Backup: Supports scheduled automatic backups and rotation.
* Rescue Channel: Each backup includes a zero-dependency rescue.mjs, enabling recovery via Node.js even if DSH fails to start.
* Credential Redaction: Automatically redacts secrets (e.g., keys) in settings.yaml during export, so plaintext never appears in the backup package.
* Session Health Check: Supports scanning and verifying session files.
* AI Recovery Assistant: Provides optional AI-assisted recovery (disabled by default).
Installation and Activation¶
Use the following command to install the plugin:
dsh plugin --profile web add @having5548/dsh-backup
After installation, restart the service and refresh the page.
Usage¶
Panel Operations¶
- Open Settings → Backup and Restore.
- Select the components to include (e.g., sessions, attachments, mnemon), and click “Export Backup Package.”
- When restoring, select the backup package, run a “Pre-check” first, and after confirming everything is correct, choose either “Merge” or “Overwrite” mode to execute.
Slash Commands¶
Enter the following commands directly in the conversation:
/backup # Backup immediately
/backup auto 12 # Automatically backup every 12 hours
/backup restore latest --dry-run # Preview restore
/backup restore latest # Perform restore
/backup list | verify all | doctor | help
Rescue Channel¶
The backup directory contains rescue.mjs, which has no dependency on DSH and uses only Node.js built-in modules. Usage:
node rescue.mjs list # List backups
node rescue.mjs verify dsh-backup-xxx.zip # Verify file
node rescue.mjs restore latest --dry-run # Preview restore
node rescue.mjs restore latest --force # Force overwrite restore
Notes¶
- Credential Security: By default, secrets such as
apiKeyandtokeninsettings.yamlare redacted into placeholders, and plaintext will not be exported. During overwrite import, these placeholders will automatically be backfilled with the current local values. - Restart Requirement: After importing data, you must restart the service and refresh the page for the session list to update.
- Machine-Switching Paths: The workspace records in the backup store absolute paths. After switching machines, paths must be manually adjusted; otherwise, the workspace list may display abnormally.
- Mnemon Scope: Mnemon uses global scope by default. If the workspaces scope is used, the workspace directory path must remain unchanged after restoration.
- Backup Format: The backup format is DshBackup v1.
Summary¶
This plugin solves the migration and backup challenges of the DSH development environment through ZIP packaging and byte-level copying. For more details, refer to the GitHub repository.