-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbackinator.conf
156 lines (138 loc) · 5.61 KB
/
backinator.conf
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# ===========================================================================
# $Id$
#
# backinator -- Example configuration file.
#
# Rafi Khardalian <rafi|at|ticketmaster.com> -- Wed Jun 17 15:03:31 PDT 2009
#
# ===========================================================================
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# (C) Copyright Ticketmaster, Inc. 2009
# ===========================================================================
[main]
# Backup jobs, by name, which should be run Each job must have a corresponding
# config section. Jobs can be named essentially anything but should not contain
# any special characters.
jobs = backupMyStuff, backupWebsites, backupOurDB, backupOurSVN
# Path to lock file
lockfile = /tmp/backinator.lock
# Loglevel maps directly to syslog levels, with appropriate values ranging
# from 0-7. Level 0 is the least verbose, where 7 wil log debug output.
loglevel = 5
# Fairly obvious. Make sure each of these values are correct for your system.
# The individual necessity of a given binary is determined by the type of
# backup job.
rsync_bin = /usr/bin/rsync
tar_bin = /bin/tar
gzip_bin = /bin/gzip
mysql_bin = /usr/bin/mysql
mysqldump_bin = /usr/bin/mysqldump
svnadmin_bin = /usr/bin/svnadmin
ejabberdctl_bin = /usr/sbin/ejabberdctl
kdb5_util_bin=/usr/kerberos/sbin/kdb5_util
[defaults]
# Any parameter defined in this section can be overridden within
# individual job stanzas.
rsync_opts = -a
tar_opts = -czpf
gzip_opts = -q
svnadmin_opts = -q
kdb5_util_opts = dump
# Backup job stanzas; there can be any number of these. Each "type" can
# potentially have different parameter requirements.
# Destination paths (dst) can contain strftime() macros. Check out the strftime
# man page for a list of available macros. Source paths (src) can contain
# globs and any number of directories/files. Each path must be separated
# with a comma.
# Valid types are tgz, rsync, mysql and svn:
#
# tgz = Creates a gzipped tarball of the source files/dirs .
# (requires: type, src, dst)
#
# rsync = Mirrors a set of sources to a destination.
# (requires: type, src, dst)
#
# mysql = Produces a gzipped dump of mysql databases.
# (requires: type, databases, dst).
#
# svn = Produces a gzipped dump of a single SVN repository.
# (requires: type, repo, dst).
#
# ejabberd = Produces a gzipped dump of an ejabberd database.
# (requires: type, tmpdir, dst).
#
# kerberos = Produces a gzipped drump of a kerberos database.
# (requires: type, realms, dst).
# Example tgz backup job using globs and strftime macros.
[backupMyStuff]
type = tgz
src = /path/to/source, /path/to/source2 /path/to/stuff/*.foo
dst = /archives/version_control-%H.tar.gz
# Command to execute before the job runs
pre = /usr/local/bin/do_before_backup.sh
# Command to execute after the job runs
post = /usr/local/bin/do_after_backup.sh
# If there are any errors executing thie job, exit and stop
# processing subsequent jobs.
stop_on_error = 1
# Example rsync job.
[backupWebsites]
type = rsync
src = /home/www/www.mysite.com /var/log/mysite/*_log
dst = /archive/%Y/%m
rsync_opts = -aR
# Example mysql dump job. Some parameters operate differently here, see below.
[backupOurDB]
type = mysql
# Databases to dump. Any number can be specified, including the keyword "all".
# As would be expected, specifying "all" will dump all databases within the
# specified mysql instance.
databases = ourdb
# Destination operates a bit differently for mysql. The reason is that we
# support multiple databases, each with their own dump file. As such, the
# basename of the destination path is actually modified.
#
# For example, if a destination of /tmp/daily-db-backup.gz were specified,
# the actual output file would be /tmp/ourdb-daily-db-backup.gz. Basically,
# the database name is appended to the beginning of the output file. This
# behavior may be more configurable in the future.
dst = /archive/ourdb-%Y-%m-%d.gz
# Optional parameters for authenticating with mysql. If no username or
# password is required, the keyword "none" must be specified where applicable.
user = root
pass = passw0rd!!
# Example Subversion dump job. In order for this to work, backinator must
# be running on a system with file level access to the actual repository.
# Subversion jobs are one-to-one, meaning you need a discrete job entry for
# each repository.
[backupOurSVN]
type = svn
repo = /home/svn/oursvn
dst = /archive/oursvn-svn-%w.gz
# Example ejabberd backup job.
[backupJabber]
type = ejabberd
# Must be writable to the user ejabberd is running as.
tmpdir = /var/lib/ejabberd
dst = /archive/dumps/%Y/%m/%Y%m%d-jabber_db.txt.gz
# Example kerberos backup job.
[backupKerberos]
type = kerberos
# Realm name must match exactly and should be capitalized on most systems.
realms = EXAMPLE.COM
# For example, if a destination of /tmp/backup.gz were specified,
# the actual output file would be /tmp/relam-backup.gz. Basically,
# the realm name is appended to the beginning of the output file. This
# behavior may be more configurable in the future.
dst = /archive/backup-%Y-%m-%d.gz