blob: d203fd2b4402f1d19c4d3bff6780597862957f92 [file] [log] [blame]
marcod468a042016-06-14 22:13:03 +02001
2==================================
3cassandra
4==================================
5
6Service cassandra description
7
8Sample pillars
9==============
10
11Single cassandra service
12
13.. code-block:: yaml
14
15 cassandra:
16 server:
17 enabled: true
18 version: icehouse
19
Jiri Broulikf46f2222017-07-06 13:52:32 +020020Backup client with ssh/rsync remote host
21
22.. code-block:: yaml
23
24 cassandra:
25 backup:
26 client:
27 enabled: true
Anton Samoylov452ea5a2019-02-05 16:25:48 +040028 cleanup_snaphots: true
Jiri Broulikf46f2222017-07-06 13:52:32 +020029 full_backups_to_keep: 3
30 hours_before_full: 24
31 target:
32 host: cfg01
Jiri Broulikf3ec8b42018-03-05 12:11:08 +010033 home_dir: server-home-dir
Jiri Broulikf46f2222017-07-06 13:52:32 +020034
35 .. note:: full_backups_to_keep param states how many backup will be stored locally on cassandra client.
36 More options to relocate local backups can be done using salt-formula-backupninja.
37
38
Jiri Broulikcd564b62018-07-31 17:20:47 +020039Backup client container with ssh/rsync remote host
40
41.. code-block:: yaml
42
43 cassandra:
44 backup:
45 client:
46 enabled: true
Anton Samoylov452ea5a2019-02-05 16:25:48 +040047 cleanup_snaphots: true
Jiri Broulikcd564b62018-07-31 17:20:47 +020048 full_backups_to_keep: 3
49 hours_before_full: 24
50 containers:
51 - opencontrail_controller_1
52 target:
53 host: cfg01
54 home_dir: server-home-dir
55
Jiri Broulikf46f2222017-07-06 13:52:32 +020056Backup client with local backup only
57
58.. code-block:: yaml
59
60 cassandra:
61 backup:
62 client:
63 enabled: true
Anton Samoylov452ea5a2019-02-05 16:25:48 +040064 cleanup_snaphots: true
Jiri Broulikf46f2222017-07-06 13:52:32 +020065 full_backups_to_keep: 3
66 hours_before_full: 24
67
68 .. note:: full_backups_to_keep param states how many backup will be stored locally on cassandra client
69
70
Martin Polreich0a165102018-03-04 17:29:53 +010071Backup client at exact times:
72
73..code-block:: yaml
74
75 cassandra:
76 backup:
77 client:
78 enabled: true
Anton Samoylov452ea5a2019-02-05 16:25:48 +040079 cleanup_snaphots: true
Martin Polreich0a165102018-03-04 17:29:53 +010080 full_backups_to_keep: 3
81 incr_before_full: 3
82 backup_times:
Martin Polreichb81606a2018-04-25 15:30:47 +020083 day_of_week: 0
Martin Polreich0a165102018-03-04 17:29:53 +010084 hour: 4
85 minute: 52
86 compression: true
87 compression_threads: 2
88 database:
89 user: user
90 password: password
91 target:
92 host: host01
93
94 .. note:: Parameters in ``backup_times`` section can be used to set up exact
95 time the cron job should be executed. In this example, the backup job
96 would be executed every Sunday at 4:52 AM. If any of the individual
97 ``backup_times`` parameters is not defined, the defalut ``*`` value will be
98 used. For example, if minute parameter is ``*``, it will run the backup every minute,
99 which is ususally not desired.
Martin Polreichb81606a2018-04-25 15:30:47 +0200100 Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``.
Martin Polreich0a165102018-03-04 17:29:53 +0100101 Please see the crontab reference for further info on how to set these parameters.
102
103 .. note:: Please be aware that only ``backup_times`` section OR
104 ``hours_before_full(incr)`` can be defined. If both are defined,
105 the ``backup_times`` section will be peferred.
106
107 .. note:: New parameter ``incr_before_full`` needs to be defined. This
108 number sets number of incremental backups to be run, before a full backup
109 is performed.
110
111
Jiri Broulikf46f2222017-07-06 13:52:32 +0200112Backup server rsync
113
114.. code-block:: yaml
115
116 cassandra:
117 backup:
118 server:
119 enabled: true
120 hours_before_full: 24
121 full_backups_to_keep: 5
122 key:
123 cassandra_pub_key:
124 enabled: true
125 key: ssh_rsa
126
Jiri Broulika6496d72018-02-28 16:21:28 +0100127Backup server without strict client restriction
128
129.. code-block:: yaml
130
131 cassandra:
132 backup:
133 restrict_clients: false
134
Martin Polreich0a165102018-03-04 17:29:53 +0100135Backup server at exact times:
136
137..code-block:: yaml
138
139 cassandra:
140 backup:
141 server:
142 enabled: true
143 full_backups_to_keep: 3
144 incr_before_full: 3
145 backup_dir: /srv/backup
146 backup_times:
Martin Polreichb81606a2018-04-25 15:30:47 +0200147 day_of_week: 0
Martin Polreich0a165102018-03-04 17:29:53 +0100148 hour: 4
149 minute: 52
150 key:
151 cassandra_pub_key:
152 enabled: true
153 key: key
154
155 .. note:: Parameters in ``backup_times`` section can be used to set up exact
156 time the cron job should be executed. In this example, the backup job
157 would be executed every Sunday at 4:52 AM. If any of the individual
158 ``backup_times`` parameters is not defined, the defalut ``*`` value will be
159 used. For example, if minute parameter is ``*``, it will run the backup every minute,
160 which is ususally not desired.
Martin Polreichb81606a2018-04-25 15:30:47 +0200161 Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``.
Martin Polreich0a165102018-03-04 17:29:53 +0100162 Please see the crontab reference for further info on how to set these parameters.
163
164 .. note:: Please be aware that only ``backup_times`` section OR
165 ``hours_before_full(incr)`` can be defined. If both are defined, The
166 ``backup_times`` section will be peferred.
167
168 .. note:: New parameter ``incr_before_full`` needs to be defined. This
169 number sets number of incremental backups to be run, before a full backup
170 is performed.
171
Jiri Broulikf46f2222017-07-06 13:52:32 +0200172Client restore from local backup:
173
174.. code-block:: yaml
175
176 cassandra:
177 backup:
178 client:
179 enabled: true
180 full_backups_to_keep: 3
181 hours_before_full: 24
182 target:
183 host: cfg01
184 restore_latest: 1
185 restore_from: local
186
187 .. 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.
188
189Client restore from remote backup:
190
191.. code-block:: yaml
192
193 cassandra:
194 backup:
195 client:
196 enabled: true
197 full_backups_to_keep: 3
198 hours_before_full: 24
199 target:
200 host: cfg01
201 restore_latest: 1
202 restore_from: remote
203
204 .. 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.
205
206
Jiri Broulikcd564b62018-07-31 17:20:47 +0200207Client restore container from remote backup:
208
209.. code-block:: yaml
210
211 cassandra:
212 backup:
213 client:
214 enabled: true
215 full_backups_to_keep: 3
216 hours_before_full: 24
217 containers:
218 - opencontrail_controller_1
219 target:
220 host: cfg01
221 restore_latest: 1
222 restore_from: remote
223
Jiri Broulikf46f2222017-07-06 13:52:32 +0200224
marcod468a042016-06-14 22:13:03 +0200225Read more
226=========
227
228* links
Filip Pytloun74cd9c62017-02-02 13:02:03 +0100229
230Documentation and Bugs
231======================
232
233To learn how to install and update salt-formulas, consult the documentation
234available online at:
235
236 http://salt-formulas.readthedocs.io/
237
238In the unfortunate event that bugs are discovered, they should be reported to
239the appropriate issue tracker. Use Github issue tracker for specific salt
240formula:
241
242 https://github.com/salt-formulas/salt-formula-cassandra/issues
243
244For feature requests, bug reports or blueprints affecting entire ecosystem,
245use Launchpad salt-formulas project:
246
247 https://launchpad.net/salt-formulas
248
249You can also join salt-formulas-users team and subscribe to mailing list:
250
251 https://launchpad.net/~salt-formulas-users
252
253Developers wishing to work on the salt-formulas projects should always base
254their work on master branch and submit pull request against specific formula.
255
256 https://github.com/salt-formulas/salt-formula-cassandra
257
258Any questions or feedback is always welcome so feel free to join our IRC
259channel:
260
261 #salt-formulas @ irc.freenode.net