Introduction¶
DeepSeek Harness (DSH) stores persona, long-term memory, skills, to-do items, and sessions locally in ~/.dsh. The official configuration backup plugin, dsh-config-manager, manages configuration JSON and does not cover the aforementioned “memory layer” directories. When switching computers, reinstalling, or encountering disk failures, if only the profile configuration is backed up, content accumulated on the Agent side may still be lost, requiring a restart from scratch.
Below is an introduction to the community plugin DSH-Sync-Backup (Maintainer: YAN3RA, Directory Category: Memory). It collects memory layer paths based on a whitelist, packages them into a tar archive, encrypts them using AES-256-GCM, retains them locally, and can sync them to two independent channels: WebDAV and private GitHub repositories. Upload success is determined by a read-back SHA256 verification, rather than just looking at HTTP 2xx status codes. The plugin declares zero third-party npm runtime dependencies (using only built-in Node modules; peer dependencies are provided by the harness).
The README indicates that the plugin is still undergoing breaking iterations. Before installation, please review the source code and license yourself, and pay attention to the scope of data access under the current DSH process permissions.
What is this¶
DSH-Sync-Backup is a scheduled backup plugin for DSH: it packages the DSH memory layer (memory, skills, to-do items, sessions, storage, etc.) into encrypted archives. It prioritizes local copies by default and only uploads to remote locations after explicitly enabling targets and switches.
After installation, the following are usually added:
- A settings section “Backup & Sync” (Overview / Artifacts / Channel Config / Environment & Maintenance);
- AI tools
sync_backup_run(run immediately) andsync_backup_status(view status); - A prompt section explaining tool boundaries.
Three “outbound transmission” related gates are conservatively set by default in the factory patch: dryRun: true, webdavEnabled: false, githubEnabled: false. You must actively fill in targets, turn on channel switches, and turn off dryRun for backups to actually leave the network.
Division of Labor with Official Config Backup¶
| Scope | dsh-config-manager | DSH-Sync-Backup |
|---|---|---|
| Top-level config JSON, etc. | Covered | Optional entry sync-config |
memory/, skills, to-do items, sessions, storages/, etc. |
Not Covered | Collected via whitelist and packaged with encryption |
Typical paths in the memory layer include: global persona AGENTS.md, long-term memory memory/, skills skills/, to-do items task-board/, scheduled tasks storages/schedule.json, sessions sessions/, etc. (Specifics depend on the plugin entry checkboxes).
Core Features¶
Encryption and Keys¶
Archives are processed with AES-256-GCM before being written to disk or uploaded; keys use envelope encryption (DEK is stored in ciphertext, wrapped separately by a locally derived KEK and a KEK derived from the recovery code). The recovery code is base32, not written to disk, and cannot be recalculated afterwards; it must be saved manually upon first generation or migration. It can be exported on the settings page (with secondary confirmation and limited-time plaintext display).
Dual-Channel Remote Copies¶
Both channels use the same payload and the same archive ID, without affecting each other; a failure in one channel will not abort the other.
- WebDAV: Basic authentication, suitable for Nutstore, self-hosted servers, etc.;
- GitHub: Writes to private repositories via the Contents API. Each run involves the archive body, manifest, a stable copy of
latest.tar.gz, and theindex.jsonindex.
Non-local HTTP requests are rejected by default (only loopback allows http); intranet private servers require explicit configuration of webdavAllowInsecureHttp.
Scheduling and Intervals¶
Built-in self-scheduling (schedulerEnabled is on by default):
- Local packaging cycle
intervalHours(schema default: 12 hours); - Remote sync cycle
remoteIntervalHours(default: 0, meaning sync immediately after local packaging); - Startup catch-up runs, failure backoff, etc., see README.
Note: Scheduled tasks only perform local packaging by default. Automatic upload requires both uploadOnSchedule: true and dryRun: false.
Optional Restore Self-Check¶
- In-memory self-check after packaging (
restoreCheck, off by default); - Maintenance page “Run Pre-Restore Self-Check”: extracts to the system temp directory for verification and then deletes it; does not write back to
$DSH_HOME.
The plugin does not provide a one-click restore that writes back to $DSH_HOME; disaster recovery requires manual unpacking after decryption using the recovery code.
Retention and Cleanup¶
Local artifacts are constrained by localKeepDays (default 7 days) and keepLast (default 7 files); remote retention is trimmed by channel keepLast. Cleanup and backup run serially and share a run lock; if a backup is in progress, it will return busy.
Installation and Activation¶
The plugin package includes cordis.patch.yml (declared in dsh.bundle.patch). After installation, the host side registers automatically. No need to manually insert the same loader ID in the profile (duplicate inserts may cause duplicate loader entries and prevent startup).
The installation spec only accepts: npm package name, Git URL, tarball URL / local .tgz, local absolute path; do not use GitHub web tree links, and do not use the github:user/repo shorthand (it may be parsed as SSH causing EPERM).
Plugin Page (Desktop / Web)¶
Sidebar → Plugins → Add Plugin → Paste one of the following → Install → Fully Quit and Restart DSH:
dsh-sync-backup
https://github.com/YAN3RA/DSH-Sync-Backup/archive/refs/tags/V1.5-261011.tar.gz
git+https://github.com/YAN3RA/DSH-Sync-Backup.git
For corporate networks or proxy environments, prioritize using the tarball line (pure HTTPS, does not depend on local git).
Command Line¶
dsh plugin --profile desktop add dsh-sync-backup
dsh plugin --profile desktop add https://github.com/YAN3RA/DSH-Sync-Backup/archive/refs/tags/V1.5-261011.tar.gz
dsh plugin --profile desktop add git+https://github.com/YAN3RA/DSH-Sync-Backup.git
Before running CLI commands for the desktop version, you must fully quit the desktop application. Uninstall example:
dsh plugin --profile desktop remove dsh-sync-backup
If the plugin causes startup failure due to errors, you can override it at the top level of cordis.patch.yml:
- id: dsh-sync-backup
disabled: true
Typical Usage¶
Switching Machines or Reinstalling: Encrypt Locally First, Then Enable Channel Uploads¶
- Install and restart DSH, open Settings → Backup & Sync → Channel Config, and fill in WebDAV or GitHub targets (or both);
- Use plugin scripts to write credentials (do not write passwords into config files):
node tools/set-webdav-password.mjs --verify
node tools/set-github-token.mjs --verify
- Turn off
dryRunand execute an upload backup, for example via AI tool:sync_backup_run(upload: true).
Local encrypted archives are located at $DSH_HOME/dsh-sync-backup/artifacts/; each channel will perform a read-back SHA256 verification after upload.
Daily Configuration without Modifying YAML¶
Users can overwrite and write $DSH_HOME/dsh-sync-backup/config.json locally (saving on the settings page takes effect immediately, no restart required). Factory defaults come from cordis.patch.yml; modifications there require a restart. Deleting config.json returns the whole setup to the factory override layer without reinstalling the plugin.
Example of adjusting defaults in the patch:
- id: dsh-sync-backup
config:
intervalHours: 6
Shrinking the Backup Set On-Demand¶
The “Environment & Maintenance” page allows checking backup entries item by item (including risk levels and local size). The default set includes persona, memory, skills, task-board, sync-config, storages, sessions, etc.; profiles (plugins and dependency trees, which can reach GB scale) are not selected by default.
Use Cases and Notes¶
Who is it for
- People who need a safety net for the memory layer and do not want to rebuild context from scratch when switching machines;
- People who want local encrypted copies plus dual remote verification via WebDAV / GitHub;
- People who want scheduled local packaging and only enable uploads on demand.
Please confirm before use
- The plugin reads and writes
$DSH_HOMEwith current DSH process permissions; please read the GitHub Repository source code andLICENSEbefore installation; - The README is marked “Testing”, features are still undergoing breaking iterations, please be cautious in production environments;
- Consecutive partial failures reaching
partialAlertAfter(default 3) will enterneedsAttention; please monitor the health bar on the overview page; - The community directory SkillHub Plugin Page is an independent site and has no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
DSH-Sync-Backup supplements the memory layer not covered by official config backups: encrypted archives, local retention, optional WebDAV and GitHub dual channels, and under default configuration, it strives to ensure “no outbound transmission unless explicitly configured”. The version number adopts the V<major>.<minor>-<YYMMDD> format; the tarball example in the materials corresponds to V1.5-261011 (npm package.json is 1.5.0).
- Directory Page: https://www.skillhub.cn/plugins/YAN3RA/DSH-Sync-Backup
- GitHub: https://github.com/YAN3RA/DSH-Sync-Backup