Files
yingyulan/.git-sync-readme.md

28 lines
1.4 KiB
Markdown
Raw Permalink 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.
# 同步与备份说明(本仓库)
> 建立:2026-09-17
## git 同步(本仓库)
- **本地仓库**:`~/novel/yingyulan`(分支 `main`)
- **远端**:私有 Gitea `http://10.147.17.252:3000/512song/yingyulan`(走 ZeroTier 内网)
- **入库内容**:**只有 md 文本**(创作定案:框架、创意库、演出本、人物档、事件档、资料库)
- **图片不入库**(`参考图/`、`生成图/` 等,约 83M,见 `.gitignore`)——图片由每日 tar.gz 备份兜底
- **凭据**:存于 `~/.git-credentials`(权限 600),远端 URL 不含密码
- **定时任务**:每天 **06:00**(与本机 tar.gz 备份同一时刻)执行
- `~/.hermes/profiles/xiaoshuo/scripts/novel_git_sync.sh` —— 有改动才提交并推送;无改动静默退出;失败非零退出
- **手动同步**:`bash ~/.hermes/profiles/xiaoshuo/scripts/novel_git_sync.sh`
## 本机备份(兜底)
| 时间 | 内容 | 位置 | 保留 |
|---|---|---|---|
| 03:00 | Hindsight 记忆库(pg_dump) | `~/hindsight-backups/` | 10 份 |
| 06:00 | 创作档案全量(含图片,tar.gz) | `~/novel-backups/` | 14 份 |
## 注意
- 远端在 ZeroTier 内网(本机 `10.147.17.143/24`)。**若推送报连接失败,先确认对方机器与 ZeroTier 在线**,不必怀疑凭据。
- 重装/换机后恢复顺序:`git clone`(拿回 md 文本)→ 再从 `~/novel-backups/*.tar.gz` 恢复图片。