Files
shanxia2.0/生产环境部署/生产环境数据库备份的shell脚本/backup.conf.example
T
2026-09-26 11:59:39 +08:00

31 lines
966 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# shanxia2.0 生产库备份配置
# 用法:复制为同目录 backup.conf 后按实际填写(backup.conf 勿提交到 Git)
#
# cp backup.conf.example backup.conf
# vi backup.conf
# MySQL 连接(与生产 .env.production 中 DATABASE_URL 一致)
# 生产实际值见同目录 backup.conf(已按 .env.production 填写,已加入 .gitignore)
MYSQL_HOST=121.43.228.102
MYSQL_PORT=3306
MYSQL_USER=root
# 来自 backend/.env.production DATABASE_URL
MYSQL_PASSWORD='hn02le.34lkdLKD'
MYSQL_DATABASE=shanxia2.0
# 备份落地目录(生产机建议)
BACKUP_DIR=/iflytek/shanxia2.0/db-backup/data
# 日志目录
LOG_DIR=/iflytek/shanxia2.0/db-backup/logs
# 备份保留天数(超过自动删除)
KEEP_DAYS=14
# sys_api_request_log 表数据+索引超过该阈值(字节)时执行 TRUNCATE 清理
# 默认 2G = 2147483648
LOG_TABLE_MAX_BYTES=2147483648
# 不备份数据的表(仅保留表结构)
IGNORE_DATA_TABLE=sys_api_request_log