Preface¶
User data for DeepSeek Harness (DSH) is concentrated in ~/.dsh. The DSH ecosystem emphasizes “everything is a plugin,” with the community directory being an independent site—not an official app store, and without any official affiliation to DeepSeek or High-Flyer. dsh-backup addresses backup, restore, verification, scheduled tasks, GitHub synchronization, and rescue recovery for this type of user data, especially when DSH cannot start.
What Is This¶
dsh-backup is a DSH plugin maintained by xiaoyuyu6420 under the MIT license. It is designed for DeepSeek Harness users to back up and restore user data under ~/.dsh, offering features such as sha256 verification, retention policies, credential sanitization, scheduled backups, GitHub sync pulls, and a graphical settings panel.
The plugin requires:
macOS / Linux / Windows 10+DSH 0.1.1-rc.2 or compatible
Core Capabilities¶
Verified capabilities include:
- Backing up DeepSeek Harness user data (
~/.dsh) using/backup - Configuring scheduled automatic backups with
/backup auto, which persist after restarts - Generating sha256 checksums for backups and supporting integrity verification
- Backup rotation/retention policies, with a default of
keep 7 - Previewing restore with
--dry-runbefore execution, with automatic rollback and a result receipt if restore fails - Credential sanitization by default from archives, with plaintext stored only in the local vault
- Supporting GitHub sync pulls and cross-machine restore pre-checks
- Providing a Visual Settings panel for listing, verifying, restoring, deleting, and editing settings
- Using a rescue console for recovery when DSH cannot start
- Performing session log health checks and repairs with
/backup doctor - Generating pre-upgrade snapshots when the host version changes
- Supporting
macOS / Linux / Windows 10+
Installation and Enabling¶
First, install the plugin, then restart dsh web as per the plugin instructions. The official installation command is:
dsh plugin --profile web add @xiaoyuyu6420/dsh-backup
Before installation, it is recommended to check the source code and license. The plugin runs with the permissions of the current dsh process, and the scope of permissions depends on your dsh runtime environment.
Note: There is an inconsistency in version information across verified materials: package.json declares 0.9.1, while the README examples and recent release notes mention 0.9.0. The actual version should be based on the package.json of the installed package.
Typical Usage¶
Below is an introduction based on common operation sequences.
1. Manual Backup¶
/backup
This step generates a backup archive for ~/.dsh. The default backup target is:
~/Desktop/dsh-backups/
2. View Backup List¶
/backup list
Used to view existing backups.
3. Verify Backup Integrity¶
/backup verify all
Used to check the sha256 checksums and integrity of backups.
4. Preview Restore¶
/backup restore latest --dry-run
Previews what will be restored without directly overwriting the current state.
5. Execute Restore¶
/backup restore latest
Executes the restore after confirmation. If restore fails, it triggers automatic rollback and provides a result receipt.
6. Configure Scheduled Automatic Backup¶
/backup auto 12
This step enables scheduled automatic backups; 12 is the timing parameter in the command. This configuration persists after restarts and rotates according to the default retention policy, which is keep 7 by default.
7. Check Session Logs¶
/backup doctor
Used for session log health checks and repairs.
8. Pull Backups from GitHub¶
/backup github pull
Used to sync and pull backup archives from GitHub.
9. Cross-Machine Restore with Dependency Handling¶
/backup restore latest --sync-deps
Used for cross-machine restore scenarios, syncing relevant dependencies.
Default Paths and Retention Policies¶
The default backup directory is:
~/Desktop/dsh-backups/
The default retention policy is:
keep 7
Credential Handling¶
Credentials are sanitized from archives by default. Plaintext is stored only in the local vault and does not propagate with the archive.
When DSH Cannot Start¶
If dsh cannot start, you can use the rescue console generated by the backup for recovery. It is designed for recovery scenarios when DSH cannot start normally.
Use Cases and Notes¶
Suitable for the following situations:
- Preserving a rollback snapshot before upgrades
- Restoring after accidental deletion or corruption of
~/.dsh - Scheduled backups to reduce manual oversights
- Cross-machine migration or GitHub sync pulls
- Verifying backup integrity
Notes:
- Platform requirements:
macOS / Linux / Windows 10+ - DSH requirements:
0.1.1-rc.2 or compatible - Restart
dsh webafter installation - The plugin runs with the permissions of the current
dshprocess - There is an inconsistency in version information; it is recommended to base it on the actual
package.json
Links¶
Directory page:
https://www.skillhub.cn/plugins/xiaoyuyu6420/dsh-backup
GitHub:
https://github.com/xiaoyuyu6420/dsh-backup