blob: c4c7354282f688efa41c4dfffc33a513e4301f38 [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
Jiri Broulikf7897812018-07-31 11:31:34 +020054Backup client containers with ssh/rsync remote host
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 containers:
65 - opencontrail_controller_1
66 target:
67 host: cfg01
68 backup_dir: server-home-dir
69
Jiri Broulikf7ce71d2017-07-06 13:51:20 +020070Backup client with local backup only
71
72.. code-block:: yaml
73
74 zookeeper:
75 backup:
76 client:
77 enabled: true
78 full_backups_to_keep: 3
79 hours_before_full: 24
80
81 .. note:: full_backups_to_keep param states how many backup will be stored locally on zookeeper client
82
Martin Polreich7a675492018-03-04 17:11:12 +010083Backup client at exact times:
84
85..code-block:: yaml
86
87 zookeeper:
88 backup:
89 client:
90 enabled: true
91 full_backups_to_keep: 3
92 incr_before_full: 3
93 backup_times:
Martin Polreich0bdc74a2018-04-25 15:33:46 +020094 day_of_week: 0
Martin Polreich7a675492018-03-04 17:11:12 +010095 hour: 4
96 minute: 52
97 compression: true
98 compression_threads: 2
99 database:
100 user: user
101 password: password
102 target:
103 host: host01
104
105 .. note:: Parameters in ``backup_times`` section can be used to set up exact
106 time the cron job should be executed. In this example, the backup job
107 would be executed every Sunday at 4:52 AM. If any of the individual
108 ``backup_times`` parameters is not defined, the defalut ``*`` value will be
109 used. For example, if minute parameter is ``*``, it will run the backup every minute,
110 which is ususally not desired.
Martin Polreich0bdc74a2018-04-25 15:33:46 +0200111 Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``.
Martin Polreich7a675492018-03-04 17:11:12 +0100112 Please see the crontab reference for further info on how to set these parameters.
113
114 .. note:: Please be aware that only ``backup_times`` section OR
115 ``hours_before_full(incr)`` can be defined. If both are defined,
116 the ``backup_times`` section will be peferred.
117
118 .. note:: New parameter ``incr_before_full`` needs to be defined. This
119 number sets number of incremental backups to be run, before a full backup
120 is performed.
121
122
Jiri Broulikf7ce71d2017-07-06 13:51:20 +0200123Backup server rsync
124
125.. code-block:: yaml
126
127 zookeeper:
128 backup:
129 server:
130 enabled: true
131 hours_before_full: 24
132 full_backups_to_keep: 5
133 key:
134 zookeeper_pub_key:
135 enabled: true
136 key: ssh_rsa
137
Jiri Broulik2756b322018-02-28 16:21:46 +0100138Backup server without strict client restriction
139
140.. code-block:: yaml
141
142 zookeeper:
143 backup:
144 restrict_clients: false
145
Martin Polreich7a675492018-03-04 17:11:12 +0100146
147Backup server at exact times:
148
149..code-block:: yaml
150
151 zookeeper:
152 backup:
153 server:
154 enabled: true
155 full_backups_to_keep: 3
156 incr_before_full: 3
157 backup_dir: /srv/backup
158 backup_times:
Martin Polreich0bdc74a2018-04-25 15:33:46 +0200159 day_of_week: 0
Martin Polreich7a675492018-03-04 17:11:12 +0100160 hour: 4
161 minute: 52
162 key:
163 zookeeper_pub_key:
164 enabled: true
165 key: key
166
167 .. note:: Parameters in ``backup_times`` section can be used to set up exact
168 time the cron job should be executed. In this example, the backup job
169 would be executed every Sunday at 4:52 AM. If any of the individual
170 ``backup_times`` parameters is not defined, the defalut ``*`` value will be
171 used. For example, if minute parameter is ``*``, it will run the backup every minute,
172 which is ususally not desired.
Martin Polreich0bdc74a2018-04-25 15:33:46 +0200173 Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``.
Martin Polreich7a675492018-03-04 17:11:12 +0100174 Please see the crontab reference for further info on how to set these parameters.
175
176 .. note:: Please be aware that only ``backup_times`` section OR
177 ``hours_before_full(incr)`` can be defined. If both are defined, The
178 ``backup_times`` section will be peferred.
179
180 .. note:: New parameter ``incr_before_full`` needs to be defined. This
181 number sets number of incremental backups to be run, before a full backup
182 is performed.
183
Jiri Broulikf7ce71d2017-07-06 13:51:20 +0200184Client restore from local backup:
185
186.. code-block:: yaml
187
188 zookeeper:
189 backup:
190 client:
191 enabled: true
192 full_backups_to_keep: 3
193 hours_before_full: 24
194 target:
195 host: cfg01
196 restore_latest: 1
197 restore_from: local
198
199 .. 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.
200
201
202Client restore from remote backup:
203
204.. code-block:: yaml
205
206 zookeeper:
207 backup:
208 client:
209 enabled: true
210 full_backups_to_keep: 3
211 hours_before_full: 24
212 target:
213 host: cfg01
214 restore_latest: 1
215 restore_from: remote
216
217 .. 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.
218
219
Jiri Broulikf7897812018-07-31 11:31:34 +0200220Client restore container from remote backup:
221
222.. code-block:: yaml
223
224 zookeeper:
225 backup:
226 client:
227 enabled: true
228 full_backups_to_keep: 3
229 hours_before_full: 24
230 containers:
231 - opencontrail_controller_1
232 target:
233 host: cfg01
234 restore_latest: 1
235 restore_from: remote