Fix exclude list matching and document usage

This commit is contained in:
Codex
2026-03-16 16:33:04 +08:00
parent 3875d6701f
commit 51c8c37c69
3 changed files with 204 additions and 18 deletions
+108 -16
View File
@@ -1,24 +1,116 @@
# 常见不需要纳入备份的临时/缓存/日志等
# ============================================================
# exclude.list
# ============================================================
# 说明:
# 1. 本文件由 tar --exclude-from 读取,匹配的是“归档内相对路径”,不是绝对路径。
# 2. 排除目录时,建议同时写:
# */dir
# */dir/*
# 3. 如果要排除单个业务文件或业务目录,请优先追加到下面“用户自定义规则”区域。
# ============================================================
# 用户自定义规则
# 在下面追加你自己的业务排除项
#
# 示例:排除单个文件
# */project/src/main.js
#
# 示例:排除一个目录
# */project/cache
# */project/cache/*
# ============================================================
# ============================================================
# 默认排除:日志、临时文件、运行时文件
# ============================================================
*.log
*.log.*
*.tmp
*.swp
*.swo
.cache/
.npm/_cacache/
node_modules/
tmp/
temp/
__pycache__/
.DS_Store
Thumbs.db
*.pid
*.sock
*.lock
.idea/
.vscode/
*.swp
*.swo
.DS_Store
Thumbs.db
# ============================================================
# 默认排除:本备份工具可能生成的归档和校验文件
# 避免把旧备份再次打进新备份包
# ============================================================
backup_*.tar.gz
backup_*.tar.gz.*
*.sha256
*.gpg
# ============================================================
# 默认排除:通用缓存和临时目录
# ============================================================
*/.cache
*/.cache/*
*/tmp
*/tmp/*
*/temp
*/temp/*
# ============================================================
# 默认排除:Node.js / 前端相关
# ============================================================
*/node_modules
*/node_modules/*
*/.npm/_cacache
*/.npm/_cacache/*
*/.next
*/.next/*
*/.nuxt
*/.nuxt/*
# ============================================================
# 默认排除:Python 相关
# ============================================================
*/__pycache__
*/__pycache__/*
*/.pytest_cache
*/.pytest_cache/*
*/.mypy_cache
*/.mypy_cache/*
*/.tox
*/.tox/*
*/.venv
*/.venv/*
*/venv
*/venv/*
.coverage
.coverage.*
*/coverage
*/coverage/*
# ============================================================
# 默认排除:Java / JVM / 通用编译产物
# ============================================================
*.o
*.class
target/
build/
dist/
*/target
*/target/*
*/build
*/build/*
*/dist
*/dist/*
*/.gradle
*/.gradle/*
# ============================================================
# 默认排除:编辑器 / IDE
# ============================================================
*/.idea
*/.idea/*
*/.vscode
*/.vscode/*
# ============================================================
# 默认排除:Terraform / 基础设施缓存
# ============================================================
*/.terraform
*/.terraform/*
*.tfstate
*.tfstate.*