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 |
| 28 | full_backups_to_keep: 3 |
| 29 | hours_before_full: 24 |
| 30 | target: |
| 31 | host: cfg01 |
Jiri Broulik | f3ec8b4 | 2018-03-05 12:11:08 +0100 | [diff] [blame] | 32 | home_dir: server-home-dir |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 33 | |
| 34 | .. note:: full_backups_to_keep param states how many backup will be stored locally on cassandra client. |
| 35 | More options to relocate local backups can be done using salt-formula-backupninja. |
| 36 | |
| 37 | |
Jiri Broulik | cd564b6 | 2018-07-31 17:20:47 +0200 | [diff] [blame] | 38 | Backup client container with ssh/rsync remote host |
| 39 | |
| 40 | .. code-block:: yaml |
| 41 | |
| 42 | cassandra: |
| 43 | backup: |
| 44 | client: |
| 45 | enabled: true |
| 46 | full_backups_to_keep: 3 |
| 47 | hours_before_full: 24 |
| 48 | containers: |
| 49 | - opencontrail_controller_1 |
| 50 | target: |
| 51 | host: cfg01 |
| 52 | home_dir: server-home-dir |
| 53 | |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 54 | Backup client with local backup only |
| 55 | |
| 56 | .. code-block:: yaml |
| 57 | |
| 58 | cassandra: |
| 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 cassandra client |
| 66 | |
| 67 | |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 68 | Backup client at exact times: |
| 69 | |
| 70 | ..code-block:: yaml |
| 71 | |
| 72 | cassandra: |
| 73 | backup: |
| 74 | client: |
| 75 | enabled: true |
| 76 | full_backups_to_keep: 3 |
| 77 | incr_before_full: 3 |
| 78 | backup_times: |
Martin Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 79 | day_of_week: 0 |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 80 | hour: 4 |
| 81 | minute: 52 |
| 82 | compression: true |
| 83 | compression_threads: 2 |
| 84 | database: |
| 85 | user: user |
| 86 | password: password |
| 87 | target: |
| 88 | host: host01 |
| 89 | |
| 90 | .. note:: Parameters in ``backup_times`` section can be used to set up exact |
| 91 | time the cron job should be executed. In this example, the backup job |
| 92 | would be executed every Sunday at 4:52 AM. If any of the individual |
| 93 | ``backup_times`` parameters is not defined, the defalut ``*`` value will be |
| 94 | used. For example, if minute parameter is ``*``, it will run the backup every minute, |
| 95 | which is ususally not desired. |
Martin Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 96 | 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] | 97 | Please see the crontab reference for further info on how to set these parameters. |
| 98 | |
| 99 | .. note:: Please be aware that only ``backup_times`` section OR |
| 100 | ``hours_before_full(incr)`` can be defined. If both are defined, |
| 101 | the ``backup_times`` section will be peferred. |
| 102 | |
| 103 | .. note:: New parameter ``incr_before_full`` needs to be defined. This |
| 104 | number sets number of incremental backups to be run, before a full backup |
| 105 | is performed. |
| 106 | |
| 107 | |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 108 | Backup server rsync |
| 109 | |
| 110 | .. code-block:: yaml |
| 111 | |
| 112 | cassandra: |
| 113 | backup: |
| 114 | server: |
| 115 | enabled: true |
| 116 | hours_before_full: 24 |
| 117 | full_backups_to_keep: 5 |
| 118 | key: |
| 119 | cassandra_pub_key: |
| 120 | enabled: true |
| 121 | key: ssh_rsa |
| 122 | |
Jiri Broulik | a6496d7 | 2018-02-28 16:21:28 +0100 | [diff] [blame] | 123 | Backup server without strict client restriction |
| 124 | |
| 125 | .. code-block:: yaml |
| 126 | |
| 127 | cassandra: |
| 128 | backup: |
| 129 | restrict_clients: false |
| 130 | |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 131 | Backup server at exact times: |
| 132 | |
| 133 | ..code-block:: yaml |
| 134 | |
| 135 | cassandra: |
| 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: |
Martin Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 143 | day_of_week: 0 |
Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame] | 144 | hour: 4 |
| 145 | minute: 52 |
| 146 | key: |
| 147 | cassandra_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. |
Martin Polreich | b81606a | 2018-04-25 15:30:47 +0200 | [diff] [blame] | 157 | 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] | 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 Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 168 | Client restore from local backup: |
| 169 | |
| 170 | .. code-block:: yaml |
| 171 | |
| 172 | cassandra: |
| 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 | Client restore from remote backup: |
| 186 | |
| 187 | .. code-block:: yaml |
| 188 | |
| 189 | cassandra: |
| 190 | backup: |
| 191 | client: |
| 192 | enabled: true |
| 193 | full_backups_to_keep: 3 |
| 194 | hours_before_full: 24 |
| 195 | target: |
| 196 | host: cfg01 |
| 197 | restore_latest: 1 |
| 198 | restore_from: remote |
| 199 | |
| 200 | .. 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. |
| 201 | |
| 202 | |
Jiri Broulik | cd564b6 | 2018-07-31 17:20:47 +0200 | [diff] [blame] | 203 | Client restore container from remote backup: |
| 204 | |
| 205 | .. code-block:: yaml |
| 206 | |
| 207 | cassandra: |
| 208 | backup: |
| 209 | client: |
| 210 | enabled: true |
| 211 | full_backups_to_keep: 3 |
| 212 | hours_before_full: 24 |
| 213 | containers: |
| 214 | - opencontrail_controller_1 |
| 215 | target: |
| 216 | host: cfg01 |
| 217 | restore_latest: 1 |
| 218 | restore_from: remote |
| 219 | |
Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 220 | |
marco | d468a04 | 2016-06-14 22:13:03 +0200 | [diff] [blame] | 221 | Read more |
| 222 | ========= |
| 223 | |
| 224 | * links |
Filip Pytloun | 74cd9c6 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 225 | |
| 226 | Documentation and Bugs |
| 227 | ====================== |
| 228 | |
| 229 | To learn how to install and update salt-formulas, consult the documentation |
| 230 | available online at: |
| 231 | |
| 232 | http://salt-formulas.readthedocs.io/ |
| 233 | |
| 234 | In the unfortunate event that bugs are discovered, they should be reported to |
| 235 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 236 | formula: |
| 237 | |
| 238 | https://github.com/salt-formulas/salt-formula-cassandra/issues |
| 239 | |
| 240 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 241 | use Launchpad salt-formulas project: |
| 242 | |
| 243 | https://launchpad.net/salt-formulas |
| 244 | |
| 245 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 246 | |
| 247 | https://launchpad.net/~salt-formulas-users |
| 248 | |
| 249 | Developers wishing to work on the salt-formulas projects should always base |
| 250 | their work on master branch and submit pull request against specific formula. |
| 251 | |
| 252 | https://github.com/salt-formulas/salt-formula-cassandra |
| 253 | |
| 254 | Any questions or feedback is always welcome so feel free to join our IRC |
| 255 | channel: |
| 256 | |
| 257 | #salt-formulas @ irc.freenode.net |