系统维护修复报告
DR 备份拆分、权限收紧、failed unit 清理、远端 ip-sentinel 归档、DE/KR/TK logrotate 修复与备份分层保留策略。
系统维护修复报告
时间:2026-05-12 11:25 CST
范围:本机 DR 备份、权限收紧、systemd failed 清理、远端 ip-sentinel failed 服务归档、DE/KR/TK logrotate 修复、备份分层保留策略。
完成项
- DR 普通备份已改为 append-only:
/root/scripts/backup-to-de.sh不再执行restic forget或restic prune。 - 旧快照删除改为专门维护任务:新增
/root/scripts/prune-local-dr.sh与local-dr-prune.service,且要求 delete-capable prune 凭据。 - Hermes/Codex 活跃状态库和历史迁移敏感快照已收紧到
600。 - 本机 failed unit 已清理,当前
systemctl --failed为 0。 - 远端
ip-sentinel-*failed 服务判断为退休残留,已选择“禁用归档”,不是修复重建。 - 远端 DE/KR/TK logrotate 问题已修复,相关主机复查无 failed unit。
- 已建立备份分层保留策略:近期快照、长期归档、可删除缓存分开管理。
关键文件
/root/scripts/backup-to-de.sh/root/scripts/prune-local-dr.sh/etc/systemd/system/local-dr-prune.service/root/backups/BACKUP_RETENTION_POLICY.md/root/backups/remote-maint-20260512-111054/THIRD_PARTY_UPGRADE_RUNBOOK.md/root/backups/remote-maint-20260512-111054//root/.codex/LONG_TERM_MEMORY.md/root/SYSTEM_FULL_MANUAL.md
验证结果
bash -n已验证 DR 备份脚本和 prune 脚本语法。- 本机
systemctl --failed返回 0。 - 远端检查结果保存在
/root/backups/remote-maint-20260512-111054/*-after.txt。 - DE/KR/TK logrotate 修复日志分别保存在对应 detail/fix 文件中。
待人工确认
- 第三方源包升级尚未执行;需要选择维护窗口。建议低流量时段,预计 30-60 分钟,Docker CE 升级可能触发 Docker 重启。
- DR prune 任务没有启用 timer;执行前必须配置
/root/.config/local-dr/restic-rest-auth-prune或传入RESTIC_PRUNE_AUTH_FILE。