invest-backup

Featured

Back up / restore openInvest's local state — memory/ (holdings, strategy, user profile, committee records, dream logs) + db/ (trade ledger, job run history, market-data cache) + .env (SMTP/API credentials) + user_profile.json. All of this data is .gitignore'd with no historical versions in git, so a single accidental overwrite (e.g. slipping and running some one-off migration/init script) means real data loss — no git revert available. **Proactive trigger scenarios** — "backup invest data / 备份一下 openInvest 的数据", "my holdings/strategy look wiped / 我的持仓/策略好像被清空了", "invest data is lost / invest 数据丢了", "restore invest backup / 恢复一下 invest 的备份", before any reinstall/migration of the openInvest deployment on this machine, or right before running an unfamiliar migration/init script (back up first, then act).

AI & Automation 83 stars 12 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Invest Backup Skill ## Why this skill exists openInvest's real data (holdings/strategy/user profile/committee records under `memory/`, trade ledger/job history under `db/`) is **entirely `.gitignore`d** — deliberately (privacy: it contains real assets/salary/trades), but the price is that git can't help at all. There was an incident on 2026-07-08: a one-off migration script named `migrate_profile.py` (with no safety guard whatsoever) was run directly once, overwriting `user.md` / `strategy.md` / `portfolio.md` with hard-coded demo defaults; `daily_report` then exited early every day because `target_assets` had become empty, emails stopped entirely from that point on, and the user had no idea until they noticed the missing emails and traced it back. **In any of the following scenarios, proactively use this skill**: - Before running any unfamiliar migration / init / bulk script that writes to `memory/` or `db/` → `backup` first - The user says holdings, strategy, or committee records look wrong / wiped → `backup` first (even if the current state is already broken, save the "broken state" — otherwise you lose even the diagnostic material), then investigate - Migrating to a new machine / reinstalling the deployment → `backup` to package, `restore` on the new machine ## Usage ```bash plugin/skills/invest-backup/scripts/run.sh backup [output_dir] # defaults to $INVEST_ROOT/.backups/ plugin/skills/invest-backup/scripts/run.sh restore <zip_path> [--force] plugin/skills/inves...

Details

Author
longsizhuo
Repository
longsizhuo/openInvest
Created
8 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

invest-setup

First-time openInvest installation and onboarding. **ONLY use when** user explicitly says "set up invest" / "init invest" / "帮我初始化 invest", OR when `invest` skill's `doctor` returns `status="needs_setup"`. **NOT for daily usage** — once onboarding is done, the `invest` skill takes over (portfolio viewing, committee analysis, buy/sell tracking). Wraps `run.sh init --from-stdin` with the canonical 5-question flow.

83 Updated today
longsizhuo
AI & Automation Listed

backup

Backup strategy design, data integrity verification, and disaster recovery planning. Invoke with /backup.

4 Updated 1 months ago
AreteDriver
AI & Automation Listed

backup

Give a project on the shared VPS a nightly off-box backup, or work on one it already has — provision its Backblaze bucket and bucket-scoped key, write its script and systemd units, render its credentials, and prove the restore by running it rather than describing it. Encodes the toolkit these co-tenants share: restic to B2, one bucket per project, credentials in /etc/<tenant>/backup.env, a staggered timer, and a drill. TRIGGER when: a project needs a backup it does not have; an existing backup needs changing, diagnosing, or restoring from; a nightly backup unit has failed; a restic repository or a Backblaze bucket/key must be created; or someone asks where a project's snapshots live. DO NOT TRIGGER when: the task is a one-off dump taken by hand for a migration or a schema change, a git or source-code backup, or a project that is not a tenant of this box.

1 Updated 2 days ago
AnotherSava