Files
Deploy-Laboratory/docs/05-06-openlist挂载网盘与自动备份.md
2026-03-29 09:08:01 +08:00

50 lines
1.3 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.
# 05-06-openlist 挂载网盘与自动备份
> 使用 openlist 聚合网盘,再通过定时任务实现自动备份。
## TL;DR
- **自动化验收**`./ansible/bin/verify.sh run 05-06`
- **关键前置**:按本文「前置条件」准备环境变量/Secret/入口 IP
- **成功判据**:达到本文「预期」且 playbook 断言通过
- **排障**:见本文「排障」
## 前置条件
- openlist 已部署并可访问
- 目标备份目录已准备
## 操作步骤
1. 在 openlist 后台添加网盘并完成授权
2. 选择备份方式(`rclone` / cron 脚本 / GitLab CI
3. 设置定时执行策略
**唯一真源**[`ansible/files/05-06/openlist-backup-cronjob.yaml`](../ansible/files/05-06/openlist-backup-cronjob.yaml)CronJob 示例;替换镜像与 PVC
应用方式:
```bash
kubectl apply -f ansible/files/05-06/openlist-backup-cronjob.yaml
```
## 验证命令
- 检查备份目录是否按计划更新
- 检查定时任务日志是否成功
## 预期
- 备份按周期稳定执行
## 下一步
- `06-02-运维小结.md`
## 排障
- **先看 playbook 输出**:失败时先定位是 deploy/wait/http_check 哪一步。
- **集群侧总览**`kubectl get nodes -o wide``kubectl -n kube-system get pods -o wide`
- **事件与日志**`kubectl -n <ns> describe ...``kubectl -n <ns> logs ... --tail=200`