This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| Err() { echo -ne "\e[1;31m"; Log "$@" 1>&2; echo -ne "\e[0m";} | |
| Log() { echo $(date +"[%Y-%m-%d %H:%M:%S]") $@; } | |
| Log ====每日备份脚本开始运行==== | |
| UPLOADER_BIN="/root/auto-scripts/bpcs_uploader/bpcs" #bpcs 上传脚本路径(见下方bpcs文件) | |
| REMOTE_DIR=$(date +"%Y%m")/$(date +"%Y%m%d") # 远端上传路径 | |
| WORKING_DIR="/root/auto-scripts/backup_daily" # 工作路径 | |
| CONFIG_DIR=$WORKING_DIR/list.d #配置文件路径 | |
| BACKUP_DIR=$WORKING_DIR/backups #本地备份路径 | |
| CURRENT_DIR=$BACKUP_DIR/$(date +"%Y%m%d") |