{"_id":"@backblaze-labs/openhands-b2-backup","_rev":"2-241ec162f02fa1574340163aaeaebec3","name":"@backblaze-labs/openhands-b2-backup","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@backblaze-labs/openhands-b2-backup","version":"0.1.0","keywords":["openhands","opendevin","all-hands","backblaze","b2","backup"],"license":"MIT","_id":"@backblaze-labs/openhands-b2-backup@0.1.0","maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"homepage":"https://github.com/backblaze-b2-samples/openhands-b2-backup#readme","bugs":{"url":"https://github.com/backblaze-b2-samples/openhands-b2-backup/issues"},"bin":{"openhands-b2-backup":"bin/openhands-b2-backup.mjs"},"dist":{"shasum":"d563937679b861a596036262c5dc68cc251ad47f","tarball":"https://registry.npmjs.org/@backblaze-labs/openhands-b2-backup/-/openhands-b2-backup-0.1.0.tgz","fileCount":5,"integrity":"sha512-a4b13649fk9CSoalvQ/3W+sWTzlIMTen/bhv4jlmnyYukmgjCdMj+aDrcaHcKYcfqumr4zjtk3ulFgEhzjXUPg==","signatures":[{"sig":"MEUCIQDkHZI7z5CGZJ/jz+dRwzv+ZaZFifmPGVGfVuWI6lRSOAIgBFNpaeiqYlGliKF2AC9smuhcmFTYjmbQjHRP0P4+ojc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7852},"main":"dist/index.mjs","type":"module","types":"dist/index.d.mts","engines":{"node":">=22.5.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"6ed899f5d3aca11be27b42e5929d3f384ba0e6fd","scripts":{"test":"vitest run","build":"tsdown src/index.ts --format esm --dts --out-dir dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"jdnyc","email":"jdeleon@jdeleon.com"},"repository":{"url":"git+https://github.com/backblaze-b2-samples/openhands-b2-backup.git","type":"git"},"_npmVersion":"11.6.0","description":"Back up your OpenHands (All-Hands-AI) conversations, settings, and secrets to Backblaze B2: incremental and encrypted.","directories":{},"_nodeVersion":"24.9.0","dependencies":{"@backblaze-labs/agent-backup-core":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.20.0","vitest":"^4.0.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/openhands-b2-backup_0.1.0_1782269876273_0.9047598143550102","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@backblaze-labs/openhands-b2-backup","version":"0.3.0","description":"Back up your OpenHands (All-Hands-AI) conversations, settings, and secrets to Backblaze B2: incremental and encrypted.","type":"module","main":"dist/index.mjs","types":"dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"bin":{"openhands-b2-backup":"bin/openhands-b2-backup.mjs"},"scripts":{"build":"tsdown src/index.ts --format esm --dts --out-dir dist","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"dependencies":{"@backblaze-labs/agent-backup-core":"^0.3.0"},"devDependencies":{"@types/node":"^22.0.0","tsdown":"^0.20.0","typescript":"^5.9.0","vitest":"^4.0.0"},"engines":{"node":">=22.5.0"},"publishConfig":{"access":"public"},"keywords":["openhands","opendevin","all-hands","backblaze","b2","backup"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/backblaze-labs/openhands-b2-backup.git"},"_id":"@backblaze-labs/openhands-b2-backup@0.3.0","gitHead":"6ed899f5d3aca11be27b42e5929d3f384ba0e6fd","bugs":{"url":"https://github.com/backblaze-labs/openhands-b2-backup/issues"},"homepage":"https://github.com/backblaze-labs/openhands-b2-backup#readme","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-GVIb+PrqsBVSfH3saKd5dzeHWszQQpla1I3o49Ommn1vr5tJfF6J7RgYqCAfAaFs0fyEX1v2/wfuKBtTUNIbTA==","shasum":"48818206d2db441d5c992361f6418a9ed1f72eb2","tarball":"https://registry.npmjs.org/@backblaze-labs/openhands-b2-backup/-/openhands-b2-backup-0.3.0.tgz","fileCount":6,"unpackedSize":8914,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBcOpVPVjyPYDV+f3lDpkWfMQDoEG3sXjulb0jM8lYFeAiEArhi3AlSZRetuv2U95NbvKwliRPFNeSV+vZtfT2T5I4A="}]},"_npmUser":{"name":"jdnyc","email":"jdeleon@jdeleon.com"},"directories":{},"maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openhands-b2-backup_0.3.0_1782273587854_0.8095094590288172"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T02:57:56.124Z","modified":"2026-06-24T03:59:48.184Z","0.1.0":"2026-06-24T02:57:56.411Z","0.3.0":"2026-06-24T03:59:48.027Z"},"bugs":{"url":"https://github.com/backblaze-labs/openhands-b2-backup/issues"},"license":"MIT","homepage":"https://github.com/backblaze-labs/openhands-b2-backup#readme","keywords":["openhands","opendevin","all-hands","backblaze","b2","backup"],"repository":{"type":"git","url":"git+https://github.com/backblaze-labs/openhands-b2-backup.git"},"description":"Back up your OpenHands (All-Hands-AI) conversations, settings, and secrets to Backblaze B2: incremental and encrypted.","maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"readme":"# openhands-b2-backup\n\nIncremental, **encrypted** backup of your [OpenHands](https://github.com/All-Hands-AI/OpenHands) conversations, settings, and secrets to [Backblaze B2](https://www.backblaze.com/cloud-storage).\n\nBuilt on [`@backblaze-labs/agent-backup-core`](https://github.com/backblaze-labs/agent-backup-core).\n\n## Why\n\nOpenHands stores every conversation locally as JSON (`base_state.json` + an append-only `events/` log) under `~/.openhands`. There's no official cloud backup — only single-conversation export. This mirrors all of it to B2 on a schedule. (`FILE_STORE=s3` points *primary* storage at the cloud; it is not an encrypted, versioned backup.)\n\n## Install & configure\n\n```bash\nnpm install -g @backblaze-labs/openhands-b2-backup\nexport B2_KEY_ID=004... B2_APPLICATION_KEY=K004... B2_BUCKET=my-openhands-backups\nexport B2_ENCRYPTION_KEY=\"a long random passphrase\"   # important — see Security\n```\n\nOr `~/.config/openhands-b2-backup/config.json`. Optional: `B2_REGION`, `B2_PREFIX`, `B2_SCHEDULE`, `B2_KEEP_SNAPSHOTS`, `OH_PERSISTENCE_DIR`, `FILE_STORE_PATH`.\n\n> Persistence is **opt-in** in OpenHands (`FILE_STORE` defaults to `memory`). If nothing is on disk under `~/.openhands`, there's nothing to back up — the daemon will say so.\n\n## Run\n\n```bash\nopenhands-b2-backup            # daemon: auto-restore on first run, then scheduled backups\nopenhands-b2-backup --once     # single backup then exit\nopenhands-b2-backup --install  # install an OS service (launchd / systemd / Task Scheduler)\n```\n\n## What gets backed up\n\nMirrors `~/.openhands` (or `OH_PERSISTENCE_DIR`), covering both layouts:\n- **V1 (current):** `conversations/<id>/base_state.json` + `events/`\n- **V0 (legacy):** `sessions/<id>/events/*.json`, plus `settings.json` and `secrets.json`\n\nCaches and lock/temp files are excluded. No SQLite is used in local mode, so no database-snapshot concerns.\n\n## Security — read this\n\n**OpenHands embeds secrets *inside* the files you must back up.** API keys live in fields within `base_state.json` (V1) and `settings.json`/`secrets.json` (V0) — they cannot be separated out by path. This tool therefore does **not** attempt selective secret exclusion; instead:\n\n- **Set `B2_ENCRYPTION_KEY`.** The entire mirror is encrypted at rest with AES-256-GCM, separate from your B2 credentials. This is the protection layer for the embedded secrets.\n- **Also set OpenHands' own `OH_SECRET_KEY`** if you can — it Fernet-encrypts secrets on disk before this tool ever reads them (defense in depth). Without it, OpenHands redacts secrets on save and they won't restore.\n\nIf you need backups with secrets fully stripped (e.g. to share), that requires field-level redaction, which this version does not do.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}