xiaoyuyu6420/dsh-backup

插件 ⭐ 3 MIT automationcodingvisualweb-ui

使用一个命令备份DeepSeek Harness用户数据:/backup,支持定时自动备份、sha256校验和以及轮转。一键备份DSH数据,支持定时自动备份。

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

安装

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:

xiaoyuyu6420/dsh-backup 加入你的 DSH 配置(web profile)即可启用。

README

展开完整 README 收起

README 内容为空。