xiaoyuyu6420/dsh-backup

Plugin ⭐ 3 MIT automationcodingvisualweb-ui

One-command backup and restore for DeepSeek Harness user data — sessions, settings, credentials, skills, and plugin config under /.dsh, excluding reinstallable nodemodules — with sha256 checksums, integrity verification, automatic rotation, and scheduled auto-backup that survives restarts. Works on

catalog description:Backup DeepSeek Harness user data with one command: /backup, scheduled auto-backup, sha256 checksums and rotation. 一键备份 DSH 数据,支持定时自动备份。

Install

Use a **private** repository — archives contain plaintext credentials. For an
`https` remote, set the token in the environment (`DSH_BACKUP_GITHUB_TOKEN` or
`GITHUB_TOKEN`); it is only written into the sync worktree's credential file
(never process args). Push is `HEAD:main --force-with-lease`; archives over
90 MB are skipped with a notice. State (last push, last error) lives in
`<destination>/auto.json` and shows in the panel and `/backup github status`.

## Settings panel (Web)

The same controls have a visual entry: a **Backup** tab inside Settings → Plugins
(`dsh web`). It shows the destination, auto-backup state, GitHub sync status, and
every archive with its size, and offers one-click back-up-now, per-archive
verify, download, and restore with a dry-run preview plus explicit confirmation.
Downloads stream from the loopback-only route `GET /backup-download/<name>`.
The tab talks to the host through the `backupPanel` Typert Remote namespace
(`/api` RPC); the browser bundle ships prebuilt in `lib/client.js` — no build
step at install time.

## How restore works

Restore is safe by construction:

1. The archive's sha256 is verified first — a corrupt archive never touches existing data.
2. Entries are listed and any path outside the backup root rejects the restore (tar path-traversal guard).
3. The current `~/.dsh` is snapshotted, then moved aside to `~/.dsh.pre-restore-<timestamp>` — restore replaces rather than merges.
4. The archive is extracted; restart `dsh` afterwards so restored sessions and settings take effect.

`--dry-run` shows the archive summary without writing anything.

## Configuration (optional)

Plugin `config` in the active cordis profile:

Add xiaoyuyu6420/dsh-backup to your DSH config (web profile) to enable.

README

Expand full README Collapse

README is empty.