Agent Skillsopenclaw/clawhub › convex-backup

convex-backup

GitHub

设置 Convex 数据定期备份,并通过在临时预览环境中执行恢复演练来验证数据完整性。包含配置符合 RPO 的调度策略、执行快照导入及数据断言,最终生成恢复操作手册,确保灾难恢复能力真实有效。

.agents/skills/convex-backup/SKILL.md openclaw/clawhub

Trigger Scenarios

需要建立或优化数据库备份策略时 需要验证数据恢复流程的有效性时 进行灾难恢复计划(DRP)测试时

Install

npx skills add openclaw/clawhub --skill convex-backup -g -y
More Options

Non-standard path

npx skills add https://github.com/openclaw/clawhub/tree/main/.agents/skills/convex-backup -g -y

Use without installing

npx skills use openclaw/clawhub@convex-backup

指定 Agent (Claude Code)

npx skills add openclaw/clawhub --skill convex-backup -a claude-code -g -y

安装 repo 全部 skill

npx skills add openclaw/clawhub --all -g -y

预览 repo 内 skill

npx skills add openclaw/clawhub --list

SKILL.md

Frontmatter
{
    "name": "convex-backup",
    "description": "Set up Convex backups and run a restore DRILL that proves recovery — snapshot, restore into a throwaway preview, assert the data came back — plus a schedule matched to your RPO and a gated recovery runbook."
}

Back up — and prove the restore works

Every backup story has two halves and most people only do the first: taking the backup, and proving you can get it back. This capability does both — it sets up regular snapshot exports and then runs a RESTORE DRILL that actually recovers the data into a disposable preview and asserts it's intact. The drill reuses migrate-rehearse's exact primitives (snapshot export → preview deploy → snapshot import) pointed at recovery instead of a forward change, so the safety net is tested, not assumed.

Workflow

  1. GUARD: deploy-guard — classify + announce the deployment being backed up (reading/exporting is safe; the drill's restore target is a throwaway preview, never prod).
  2. TAKE the snapshot: npx convex export --path backup-<date>.zip (add --include-file-storage if the app stores files). This is the backup artifact; treat it as sensitive real data.
  3. SCHEDULE it (the ongoing half): recommend a cadence matched to how fast the data changes and how much loss is tolerable (RPO) — e.g. a daily npx convex export via CI/cron to durable storage the user controls, with a retention window. Convex's own platform backups exist; this adds a user-owned, portable copy.
  4. RESTORE DRILL (the half almost nobody does — this is the point): (a) PRECONDITION: a Preview Deploy Key as CONVEX_DEPLOY_KEY (same requirement as migrate-rehearse; a paid-tier feature). If unavailable, drill against a fresh personal dev deployment instead and say so. (b) create a throwaway preview from the CURRENT code: npx convex deploy --preview-create restore-drill-<date>. (c) restore the snapshot into it: npx convex import backup-<date>.zip --deployment restore-drill-<date> --replace (import targets a deployment by NAME with --deployment; there is no --preview-name on import). (d) ASSERT recovery: read the restored data back (MCP tables for row counts, data/runOneoffQuery for spot-checks) and confirm the critical tables came back with the expected row counts and a sample of real records — a restore that 'succeeds' but lands 0 rows is a FAILED drill. Compare against the source's counts where available.
  5. REPORT the drill result plainly: what was backed up, that the restore was ACTUALLY performed and verified (or that it FAILED and why — a failed drill is the most valuable output, found before a real disaster), the recommended schedule + retention, and the recovery runbook (the exact commands to restore to prod: npx convex import backup.zip --replace --prod, gated by deploy-guard, with the post-snapshot-write-loss caveat stated).
  6. HYGIENE: delete local snapshot copies when done (real data); the drill preview auto-expires. Never commit a backup file.

Rules

  • A backup you have never restored is a hope, not a backup — always run (or offer to run) the restore DRILL, don't just take the export.
  • The drill restores into a THROWAWAY preview (or dev), never prod; the restore target and the backup source are different deployments.
  • Assert recovery, don't assume it: a restore that lands 0 rows is a FAILED drill — check critical-table row counts + a real-record sample against the source.
  • A FAILED drill is the most valuable output — surface it loudly; that's the whole reason to drill before a real disaster.
  • Schedule matched to RPO (how much data loss is tolerable); keep a user-owned portable copy alongside Convex's platform backups, with a retention window.
  • Snapshots are sensitive real data: delete local copies when done, never commit them; the restore-to-prod runbook is deploy-guard-gated with the post-snapshot-write-loss caveat stated.
  • Shares migrate-rehearse's snapshot+preview mechanics but aims them at RECOVERY, not a forward change — a forward schema change is migrate-rehearse.

Version History

  • d6a8c68 Current 2026-08-20 02:43

Same Skill Collection

.agents/skills/autoreview/SKILL.md
.agents/skills/axiom-alerting/SKILL.md
.agents/skills/axiom-sre/SKILL.md
.agents/skills/building-dashboards/SKILL.md
.agents/skills/clawhub-content-rights-correspondence/SKILL.md
.agents/skills/clawhub-convex/SKILL.md
.agents/skills/clawhub-moderation/SKILL.md
.agents/skills/clawhub-pr-maintainer/SKILL.md
.agents/skills/clawhub-production-release/SKILL.md
.agents/skills/controlling-costs/SKILL.md
.agents/skills/convex-acquire-domain/SKILL.md
.agents/skills/convex-add/SKILL.md
.agents/skills/convex-advisor/SKILL.md
.agents/skills/convex-agent/SKILL.md
.agents/skills/convex-auth/SKILL.md
.agents/skills/convex-authz/SKILL.md
.agents/skills/convex-billing/SKILL.md
.agents/skills/convex-check-updates/SKILL.md
.agents/skills/convex-cost/SKILL.md
.agents/skills/convex-create-component/SKILL.md
.agents/skills/convex-crons/SKILL.md
.agents/skills/convex-deploy-guard/SKILL.md
.agents/skills/convex-design/SKILL.md
.agents/skills/convex-docs/SKILL.md
.agents/skills/convex-domains/SKILL.md
.agents/skills/convex-env/SKILL.md
.agents/skills/convex-expert/SKILL.md
.agents/skills/convex-explain-app/SKILL.md
.agents/skills/convex-improve-convex-plugin/SKILL.md
.agents/skills/convex-insights/SKILL.md
.agents/skills/convex-launch-readiness/SKILL.md
.agents/skills/convex-migrate-rehearse/SKILL.md
.agents/skills/convex-migrate/SKILL.md
.agents/skills/convex-migration-helper/SKILL.md
.agents/skills/convex-monitor/SKILL.md
.agents/skills/convex-optimize/SKILL.md
.agents/skills/convex-performance-audit/SKILL.md
.agents/skills/convex-quickstart/SKILL.md
.agents/skills/convex-retention/SKILL.md
.agents/skills/convex-reviewer/SKILL.md
.agents/skills/convex-self-heal/SKILL.md
.agents/skills/convex-sentinel/SKILL.md
.agents/skills/convex-setup-auth/SKILL.md
.agents/skills/convex-ship/SKILL.md
.agents/skills/convex-suggest/SKILL.md
.agents/skills/convex-test/SKILL.md
.agents/skills/convex-verify/SKILL.md
.agents/skills/create-and-cleanup-migration/SKILL.md
.agents/skills/openclaw-brand/SKILL.md

Metadata

Files
0
Version
d6a8c68
Hash
d95ebe2a
Indexed
2026-08-20 02:43

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 05:24
浙ICP备14020137号-1 $mapa de visitantes$