refactor(hindsight): 使用Volumes_Path替代硬编码路径

- backup.job 改为从 env.cfg 读取 Volumes_Path
- stack.yml 路径替换为变量引用
- .gitignore 添加 hindsight/env.cfg
This commit is contained in:
cnphpbb
2026-06-08 03:28:26 +08:00
parent 7d7643df3c
commit 4133a823e9
3 changed files with 8 additions and 4 deletions

View File

@@ -6,7 +6,11 @@
# ============================================================
set -euo pipefail
BACKUP_DIR="/home/geng/hindsight/backups"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# shellcheck source=/dev/null
source "${SCRIPT_DIR}/env.cfg"
BACKUP_DIR="${Volumes_Path}/backups"
KEEP_DAYS=7
TS=$(date +%Y%m%d_%H%M%S)
FNAME="hindsight_db_${TS}.sql.gz"