Files
openclaw-home-pc/README.md
T
2026-03-28 20:08:10 +08:00

90 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenClaw 备份系统
> 作者:欢欢助理
> 更新:2026-03-28
> 仓库:https://gitea.94kan.cn/houhuan/openclaw-home-pc
---
## 一、系统架构
### 备份目录结构
```
~/openclaw-backup/
├── config/ # 配置文件(mcporter.json、TASKS.md
├── docs/ # 文档
├── knowledge/ # 知识库
├── memory/ # 记忆系统文件
├── openclaw/ # OpenClaw 核心(extensions/skills 等)
├── reports/ # 报告输出
├── scripts/ # 备份脚本
├── skills/ # 技能备份
├── vector_memory/ # 向量记忆备份(增量快照)
├── AGENTS.md # 工作区核心文件
├── HEARTBEAT.md
├── IDENTITY.md
├── MEMORY.md
├── SOUL.md
├── TOOLS.md
└── USER.md
```
### 备份目标
| 备份项 | 说明 | 备份方式 |
|--------|------|----------|
| 工作区核心文件 | AGENTS/SOUL/USER/MEMORY 等 | Git 推送到 Gitea |
| OpenClaw 配置 | extensions、skills、config | Git 推送到 Gitea |
| 向量记忆 | main.sqlite | 增量快照(rsync 硬链接) |
| 记忆文件 | memory/ 目录 | Git 推送 |
| 备份脚本 | scripts/ | Git 推送 |
---
## 二、定时任务
| 任务 | 时间 | 说明 |
|------|------|------|
| 向量记忆备份 | 每日 03:00 | 增量快照,保留 14 天 |
| OpenClaw 备份到 Gitea | 每日 04:00 | Git add → commit → push |
| 系统审计报告 | 每日 09:00 | 检查 cron/磁盘/记忆健康 |
| 每日早报推送 | 每日 07:00 | 微信摘要 + 飞书完整版 |
| 目录优化检查 | 每周日 20:00 | 检查冗余、清理、建议 |
| 邮件摘要 | 每日 06:00 | Gmail 未读邮件摘要 |
| 股票分析 | 工作日 21:00 | 收盘分析 |
---
## 三、恢复流程
### 从 Gitea 恢复
```bash
# 克隆仓库
git clone https://gitea.94kan.cn/houhuan/openclaw-home-pc.git ~/openclaw-backup
# 拉取最新
cd ~/openclaw-backup
git pull origin master
```
### 向量记忆恢复
```bash
# 从快照恢复
cp ~/openclaw-backup/vector_memory/snapshots/<日期>/main.sqlite \
~/.openclaw/memory/main.sqlite
```
---
## 四、相关文档
- [向量记忆系统架构](./vector_memory/backup_main_sqlite.sh)
- [晨间简报 cron](./scripts/morning_brief_cron.md)
---
*本文档由欢欢助理自动维护*