-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrdbackup.conf.sample
More file actions
118 lines (117 loc) · 4.67 KB
/
rdbackup.conf.sample
File metadata and controls
118 lines (117 loc) · 4.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Rdbackup configuration file
# v3.5
# --------------------------------------
# SOME GLOBAL VARIABLES
# --------------------------------------
# Uncomment and change this if it needs non-default values (see .sh script for default ones)
#MAILBIN="/usr/bin/mail -s"
#RDIFF_OPTS="-v5 --force --create-full-path --exclude-fifos --exclude-sockets --print-statistics"
#RETENTION=1W
#MYDB="mysql --execute 'show databases\G' --password=$MYSQL_PASSWORD | grep -v row | sed -e 's/Database: //g' | grep -v mysql | grep -v information_schema | grep -v performance_schema"
# Or : you can list manually the databases, one by line inside the quotes, e.g :
# MYDB='<mysql_db_name1>
# <mysql_db_name2>'
#MYSQLDUMP_OPTS="--routines"
# Change JOUR format to change retention. Ex : $(date +%w) keeps a week, $(date +%d) keeps one month.
#JOUR=$(date +%w)
# Encrypt the dump file if MYENCRYPT=1. If 1, don't forget to initialize a password in MYENCPASS.
# MYENCRYPT=0
# MYENCPASS=""
#PGDB="su - postgres -c 'psql -l --pset tuples_only' | awk '{print \$1}' | grep -v ^$ | grep -v template | grep -v : | grep -v '|'"
# Or : you can list manually the databases, one by line inside the quotes, e.g :
# PGDB='<pgsql_db_name1>
# <pgsql_db_name2>'
#PGSQLDUMP_OPTS=""
# --------------------------------------
# Mails destination
# --------------------------------------
# If more than one mail address needed : MAIL_ADMIN="admin1@domain.com admin2@domain.com"
MAIL_ADMIN=admin1@domain.com
# Mail on errors are always sent, must we sent mail on success ? (Default: yes)
MAIL_IF_SUCCESS=1
# --------------------------------------
# Server to backup / Backup server
# --------------------------------------
# Server name used in dump file names, and mails and messages sent
SERVERNAME=server.domain.com
# This suffixe will be added to dump (mysql, ldap, ...) and log/pid file names
# and eventually to list/exclude file name
SUFFIX=server
# Backup source (default : local) = server to backup
# SLOCAL=0 : (0=not local) backup FROM a remote server (via SSH)
# SLOCAL=1 : (1=local) backup FROM a local directory (or NFS mount or SMB mount)
SLOCAL=1
# Backup destination (default : remote) = backup (rdiff-backup) server
# DLOCAL=0 : (0=not local) backup TO a remote server (via SSH)
# DLOCAL=1 : (1=local) backup TO a local directory (or NFS mount or SMB mount)
DLOCAL=0
# IP (or DNS fqdn name), port, and user if source OR destination is remote
REMOTEIP=192.168.0.5
REMOTEPORT=22
REMOTEUSR=root
# --------------------------------------
# Some directories
# --------------------------------------
# Rdiff-backup destination directory (on local or on remote server)
BCK_DIR=/home/backup/$SERVERNAME
# Path where are rdbackup.sh, .conf, .list and .exclude (default: same directory as script)
SCRIPT_DIR=$(dirname $0)
# Specific path for mysql dumps, ldap dumps (on local or on remote server)
DUMP_DIR=/home/backup
# --------------------------------------
# Some file names
# --------------------------------------
# directories to backup or exclude
LIST=$SCRIPT_DIR/rdbackup_${SUFFIX}.list
EXCLUDE=$SCRIPT_DIR/rdbackup_${SUFFIX}.exclude
# LOG and other files
LOG_FILE=rdbackup_${SUFFIX}.log
PID_FILE=rdbackup_${SUFFIX}.pid
# Script to launch BEFORE backup
PRESCRIPT=
# Script to launch AFTER backup
POSTSCRIPT=
# --------------------------------------
# Databases backups
# --------------------------------------
# Stop Apache before dumping databases ? Yes if STOPAPACHE=1
STOPAPACHE=0
# Keep one week (=0) or just last backup (=1)
JUSTLAST=0
# --------------------------------------
# MySQL dump
# --------------------------------------
# Default: disabled (MYSQLDUMP=0)
MYSQLDUMP=0
# Be aware ! This conf file must be protected as it contains clear mysql password
# TODO : how to avoid this password in clear text ?
# NOTE : quote password with simple quotes + escape reserved chars ($,...)
MYSQL_PASSWORD='Mot_de_passe_MySQL'
# --------------------------------------
# PostgreSQL dump
# --------------------------------------
# Default: disabled (PGSQLDUMP=0)
PGSQLDUMP=0
# --------------------------------------
# LDAP dump
# --------------------------------------
# Default: disabled (SLAPCAT=0)
SLAPCAT=0
# --------------------------------------
# SOGO backup
# --------------------------------------
# Default: disabled (SOGOBACKUP=0)
SOGOBACKUP=0
# --------------------------------------
# stop/start STOPSEAFILE if needed
# --------------------------------------
# Default: disabled (STOPSEAFILE=0)
STOPSEAFILE=0
# --------------------------------------
# WakeOnLan
# --------------------------------------
# If SLOCAL=1 or DLOCAL=1 Wake on lan the backuped/backup server
# Default: disabled (WAKEONLAN=0)
WAKEONLAN=0
# Wakeonlan need to know the MAC address of the server to wake up
MAC="00:24:8c:ac:8a:db"