fix: 修复备份工具的多处问题

- go.mod: 将非法版本号 go 1.26.4 改为 go 1.26
- engine: 压缩失败时删除残留的半截 tar.gz 文件
- config: 支持仅按天数保留(count 和 days 均未设时才用默认 count=7)
- engine: docker compose stop 失败时也尝试重启,避免容器停摆
- list: 仅显示真正的备份归档文件(新增导出 IsBackupArchive)
- systemd: 移除 PrivateTmp,暂存目录改到安装目录内,避免私有 /tmp 被大目录撑爆
This commit is contained in:
2026-07-04 19:12:50 +08:00
parent 5c8944fd58
commit 034edb2b1e
9 changed files with 60 additions and 11 deletions
+5 -2
View File
@@ -19,8 +19,11 @@ User=root
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/opt/docker-compose-backup /tmp
PrivateTmp=yes
# The backup copies whole project directories into a staging area before
# compressing. Keep staging inside the writable install dir (see temp_dir in
# config.yaml) rather than /tmp, and do NOT use PrivateTmp — a private /tmp is
# often small/tmpfs-backed and can be exhausted by large project copies.
ReadWritePaths=/opt/docker-compose-backup
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes