Skip to content

fix: preserve deployment backups during source sync - #178

Merged
HansonL622 merged 1 commit into
1024XEngineer:mainfrom
suerzzh:fix/preserve-deployment-backups
Aug 27, 2026
Merged

fix: preserve deployment backups during source sync#178
HansonL622 merged 1 commit into
1024XEngineer:mainfrom
suerzzh:fix/preserve-deployment-backups

Conversation

@suerzzh

@suerzzh suerzzh commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

问题

生产服务器 /opt/unispeaking 内存在数据库和代码备份。原源码同步脚本执行 git clean 时没有保护 backups/,可能误删服务器备份文件。

修复

  • 同步脚本的 git clean 增加 backups/ 保留规则;
  • 工作区异常检查允许保留 backups/
  • 更新生产部署文档,明确 deploy/env/backups/runtime-logs/ 均为服务器保留目录。

安全性

  • 不修改数据库 Volume;
  • 不执行 docker compose down -v
  • 不执行 docker volume prune
  • 不修改定时器频率;
  • 不涉及应用业务代码。

@HansonL622
HansonL622 self-requested a review August 27, 2026 05:06

@HansonL622 HansonL622 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已检查本 PR 的完整固定提交范围,重点核对部署脚本的清理规则、备份脚本默认目录、同步后的工作区校验,以及部署文档中的操作示例。git clean -fd -e backups/ 能保留 backups/ 下的 PostgreSQL 备份,状态过滤也与该目录保持一致;脚本语法和 diff whitespace 检查均通过。未发现由本 PR 引入的、达到可操作阈值的正确性、可靠性或安全性问题。

@HansonL622
HansonL622 merged commit 139fff6 into 1024XEngineer:main Aug 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants