Files
gsfdc/deploy/install-backup-cron.sh
T
wuzilongandCursor 9c7c80e194 feat: 把估价智能体和部署配置提交到主分支
门户估价对话、会员与智能体账号,以及生产 Docker 部署一直停在工作区,远端主分支还没有这些改动。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 09:42:44 +08:00

13 lines
315 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
if [[ "$(id -u)" -ne 0 ]]; then
echo "需要 root"
exit 1
fi
dir="$(cd "$(dirname "$0")" && pwd)"
cat > /etc/cron.d/gsfdc-backup <<EOF
15 3 * * * root ${dir}/backup.sh >> ${dir}/backup.log 2>&1
EOF
chmod 644 /etc/cron.d/gsfdc-backup
echo "已安装每天 03:15 的数据库备份"