blob: 1e095b86f71fbb34106f17ed21727e6794eed916 [file] [log] [blame]
marco70723542016-06-14 20:25:31 +02001
2==================================
3zookeeper
4==================================
5
6Service zookeeper description
7
8Sample pillars
9==============
10
11Single zookeeper service
12
13.. code-block:: yaml
14
15 zookeeper:
16 server:
17 enabled: true
18 members:
19 - host: ${_param:single_address}
20 id: 1
21
22Cluster zookeeper service
23
24.. code-block:: yaml
25
26 zookeeper:
27 server:
28 enabled: true
29 members:
30 - host: ${_param:cluster_node01_address}
31 id: 1
32 - host: ${_param:cluster_node02_address}
33 id: 2
34 - host: ${_param:cluster_node03_address}
35 id: 3
36
Jiri Broulikf7ce71d2017-07-06 13:51:20 +020037Backup client with ssh/rsync remote host
38
39.. code-block:: yaml
40
41 zookeeper:
42 backup:
43 client:
44 enabled: true
45 full_backups_to_keep: 3
46 hours_before_full: 24
47 target:
48 host: cfg01
Jiri Broulik49111492018-03-05 12:11:27 +010049 backup_dir: server-home-dir
Jiri Broulikf7ce71d2017-07-06 13:51:20 +020050
51 .. note:: full_backups_to_keep param states how many backup will be stored locally on zookeeper client.
52 More options to relocate local backups can be done using salt-formula-backupninja.
53
54Backup client with local backup only
55
56.. code-block:: yaml
57
58 zookeeper:
59 backup:
60 client:
61 enabled: true
62 full_backups_to_keep: 3
63 hours_before_full: 24
64
65 .. note:: full_backups_to_keep param states how many backup will be stored locally on zookeeper client
66
Martin Polreich7a675492018-03-04 17:11:12 +010067Backup client at exact times:
68
69..code-block:: yaml
70
71 zookeeper:
72 backup:
73 client:
74 enabled: true
75 full_backups_to_keep: 3
76 incr_before_full: 3
77 backup_times:
78 dayOfWeek: 0
79 hour: 4
80 minute: 52
81 compression: true
82 compression_threads: 2
83 database:
84 user: user
85 password: password
86 target:
87 host: host01
88
89 .. note:: Parameters in ``backup_times`` section can be used to set up exact
90 time the cron job should be executed. In this example, the backup job
91 would be executed every Sunday at 4:52 AM. If any of the individual
92 ``backup_times`` parameters is not defined, the defalut ``*`` value will be
93 used. For example, if minute parameter is ``*``, it will run the backup every minute,
94 which is ususally not desired.
95 Available parameters are ``dayOfWeek``, ``dayOfMonth``, ``month``, ``hour`` and ``minute``.
96 Please see the crontab reference for further info on how to set these parameters.
97
98 .. note:: Please be aware that only ``backup_times`` section OR
99 ``hours_before_full(incr)`` can be defined. If both are defined,
100 the ``backup_times`` section will be peferred.
101
102 .. note:: New parameter ``incr_before_full`` needs to be defined. This
103 number sets number of incremental backups to be run, before a full backup
104 is performed.
105
106
Jiri Broulikf7ce71d2017-07-06 13:51:20 +0200107Backup server rsync
108
109.. code-block:: yaml
110
111 zookeeper:
112 backup:
113 server:
114 enabled: true
115 hours_before_full: 24
116 full_backups_to_keep: 5
117 key:
118 zookeeper_pub_key:
119 enabled: true
120 key: ssh_rsa
121
Jiri Broulik2756b322018-02-28 16:21:46 +0100122Backup server without strict client restriction
123
124.. code-block:: yaml
125
126 zookeeper:
127 backup:
128 restrict_clients: false
129
Martin Polreich7a675492018-03-04 17:11:12 +0100130
131Backup server at exact times:
132
133..code-block:: yaml
134
135 zookeeper:
136 backup:
137 server:
138 enabled: true
139 full_backups_to_keep: 3
140 incr_before_full: 3
141 backup_dir: /srv/backup
142 backup_times:
143 dayOfWeek: 0
144 hour: 4
145 minute: 52
146 key:
147 zookeeper_pub_key:
148 enabled: true
149 key: key
150
151 .. note:: Parameters in ``backup_times`` section can be used to set up exact
152 time the cron job should be executed. In this example, the backup job
153 would be executed every Sunday at 4:52 AM. If any of the individual
154 ``backup_times`` parameters is not defined, the defalut ``*`` value will be
155 used. For example, if minute parameter is ``*``, it will run the backup every minute,
156 which is ususally not desired.
157 Available parameters are ``dayOfWeek``, ``dayOfMonth``, ``month``, ``hour`` and ``minute``.
158 Please see the crontab reference for further info on how to set these parameters.
159
160 .. note:: Please be aware that only ``backup_times`` section OR
161 ``hours_before_full(incr)`` can be defined. If both are defined, The
162 ``backup_times`` section will be peferred.
163
164 .. note:: New parameter ``incr_before_full`` needs to be defined. This
165 number sets number of incremental backups to be run, before a full backup
166 is performed.
167
Jiri Broulikf7ce71d2017-07-06 13:51:20 +0200168Client restore from local backup:
169
170.. code-block:: yaml
171
172 zookeeper:
173 backup:
174 client:
175 enabled: true
176 full_backups_to_keep: 3
177 hours_before_full: 24
178 target:
179 host: cfg01
180 restore_latest: 1
181 restore_from: local
182
183 .. note:: restore_latest param with a value of 1 means to restore db from the last full backup. 2 would mean to restore second latest full backup.
184
185
186Client restore from remote backup:
187
188.. code-block:: yaml
189
190 zookeeper:
191 backup:
192 client:
193 enabled: true
194 full_backups_to_keep: 3
195 hours_before_full: 24
196 target:
197 host: cfg01
198 restore_latest: 1
199 restore_from: remote
200
201 .. note:: restore_latest param with a value of 1 means to restore db from the last full backup. 2 would mean to restore second latest full backup.
202
203
marco70723542016-06-14 20:25:31 +0200204Read more
205=========
206
207* links
Filip Pytloundf51ee22017-02-02 13:02:03 +0100208
209Documentation and Bugs
210======================
211
212To learn how to install and update salt-formulas, consult the documentation
213available online at:
214
215 http://salt-formulas.readthedocs.io/
216
217In the unfortunate event that bugs are discovered, they should be reported to
218the appropriate issue tracker. Use Github issue tracker for specific salt
219formula:
220
221 https://github.com/salt-formulas/salt-formula-zookeeper/issues
222
223For feature requests, bug reports or blueprints affecting entire ecosystem,
224use Launchpad salt-formulas project:
225
226 https://launchpad.net/salt-formulas
227
228You can also join salt-formulas-users team and subscribe to mailing list:
229
230 https://launchpad.net/~salt-formulas-users
231
232Developers wishing to work on the salt-formulas projects should always base
233their work on master branch and submit pull request against specific formula.
234
235 https://github.com/salt-formulas/salt-formula-zookeeper
236
237Any questions or feedback is always welcome so feel free to join our IRC
238channel:
239
240 #salt-formulas @ irc.freenode.net