marco | d468a04 | 2016-06-14 22:13:03 +0200 | [diff] [blame] | 1 | |
| 2 | ================================== |
| 3 | cassandra |
| 4 | ================================== |
| 5 | |
| 6 | Service cassandra description |
| 7 | |
| 8 | Sample pillars |
| 9 | ============== |
| 10 | |
| 11 | Single cassandra service |
| 12 | |
| 13 | .. code-block:: yaml |
| 14 | |
| 15 | cassandra: |
| 16 | server: |
| 17 | enabled: true |
| 18 | version: icehouse |
| 19 | |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 20 | Backup client with ssh/rsync remote host |
| 21 | |
| 22 | .. code-block:: yaml |
| 23 | |
| 24 | cassandra: |
| 25 | backup: |
| 26 | client: |
| 27 | enabled: true |
Anton Samoylov | 452ea5a | 2019-02-05 16:25:48 +0400 | [diff] [blame] | 28 | cleanup_snaphots: true |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 29 | full_backups_to_keep: 3 |
| 30 | hours_before_full: 24 |
| 31 | target: |
| 32 | host: cfg01 |
Jiri Broulik | f3ec8b4 | 2018-03-05 12:11:08 +0100 | [diff] [blame] | 33 | home_dir: server-home-dir |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 34 | |
| 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 Broulik | cd564b6 | 2018-07-31 17:20:47 +0200 | [diff] [blame] | 39 | Backup client container with ssh/rsync remote host |
| 40 | |
| 41 | .. code-block:: yaml |
| 42 | |
| 43 | cassandra: |
| 44 | backup: |
| 45 | client: |
| 46 | enabled: true |
Anton Samoylov | 452ea5a | 2019-02-05 16:25:48 +0400 | [diff] [blame] | 47 | cleanup_snaphots: true |
Jiri Broulik | cd564b6 | 2018-07-31 17:20:47 +0200 | [diff] [blame] | 48 | 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 Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 56 | Backup client with local backup only |
| 57 | |
| 58 | .. code-block:: yaml |
| 59 | |
| 60 | cassandra: |
| 61 | backup: |
| 62 | client: |
| 63 | enabled: true |
Anton Samoylov | 452ea5a | 2019-02-05 16:25:48 +0400 | [diff] [blame] | 64 | cleanup_snaphots: true |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 65 | 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 Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 71 | Backup client at exact times: |
| 72 | |
| 73 | ..code-block:: yaml |
| 74 | |
| 75 | cassandra: |
| 76 | backup: |
| 77 | client: |
| 78 | enabled: true |
Anton Samoylov | 452ea5a | 2019-02-05 16:25:48 +0400 | [diff] [blame] | 79 | cleanup_snaphots: true |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 80 | full_backups_to_keep: 3 |
| 81 | incr_before_full: 3 |
| 82 | backup_times: |
Martin Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 83 | day_of_week: 0 |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 84 | 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 Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 100 | Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``. |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 101 | 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 Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 112 | Backup 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 Broulik | a6496d7 | 2018-02-28 16:21:28 +0100 | [diff] [blame] | 127 | Backup server without strict client restriction |
| 128 | |
| 129 | .. code-block:: yaml |
| 130 | |
| 131 | cassandra: |
| 132 | backup: |
| 133 | restrict_clients: false |
| 134 | |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 135 | Backup 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 Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 147 | day_of_week: 0 |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 148 | 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 Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 161 | Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``. |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 162 | 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 Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 172 | Client 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 | |
| 189 | Client 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 Broulik | cd564b6 | 2018-07-31 17:20:47 +0200 | [diff] [blame] | 207 | Client 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 Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 224 | |
marco | d468a04 | 2016-06-14 22:13:03 +0200 | [diff] [blame] | 225 | Read more |
| 226 | ========= |
| 227 | |
| 228 | * links |
Filip Pytloun | 74cd9c6 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 229 | |
| 230 | Documentation and Bugs |
| 231 | ====================== |
| 232 | |
| 233 | To learn how to install and update salt-formulas, consult the documentation |
| 234 | available online at: |
| 235 | |
| 236 | http://salt-formulas.readthedocs.io/ |
| 237 | |
| 238 | In the unfortunate event that bugs are discovered, they should be reported to |
| 239 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 240 | formula: |
| 241 | |
| 242 | https://github.com/salt-formulas/salt-formula-cassandra/issues |
| 243 | |
| 244 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 245 | use Launchpad salt-formulas project: |
| 246 | |
| 247 | https://launchpad.net/salt-formulas |
| 248 | |
| 249 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 250 | |
| 251 | https://launchpad.net/~salt-formulas-users |
| 252 | |
| 253 | Developers wishing to work on the salt-formulas projects should always base |
| 254 | their work on master branch and submit pull request against specific formula. |
| 255 | |
| 256 | https://github.com/salt-formulas/salt-formula-cassandra |
| 257 | |
| 258 | Any questions or feedback is always welcome so feel free to join our IRC |
| 259 | channel: |
| 260 | |
| 261 | #salt-formulas @ irc.freenode.net |