add backup.sh

This commit is contained in:
tianyu
2016-11-18 19:59:43 +08:00
parent 70c0ffd66d
commit c620e2dd00
3 changed files with 290 additions and 0 deletions

35
backup/backup.conf Normal file
View File

@@ -0,0 +1,35 @@
## Email configuration
EVENT="Server schedule backup"
EMAIL="receiver@gmail.com"
SENDER="sender@gmail.com"
SENDER_PASSWD="sender_password"
SMTP_SERVER="smtp.gmail.com:587"
## backup settings
BACKUP_MYSQL=true
ZIP_COMPRESS=true
TARGET_DIR="/root/Dropbox"
LOG_FILE="/var/log/backup.log"
## backup files and dirs
FILES=(
"/root/.vimrc"
"/root/.bashrc"
"/root/.my.cnf"
"/root/.screenrc"
"/root/.ssh/config"
)
DIRS=(
"/etc"
"/root/bin"
"/root/bashfiles"
"/var/www"
"/home/git"
)