| 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 |  | 
|  | 38 | Backup client with local backup only | 
|  | 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 |  | 
|  | 49 | .. note:: full_backups_to_keep param states how many backup will be stored locally on cassandra client | 
|  | 50 |  | 
|  | 51 |  | 
| Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame^] | 52 | Backup client at exact times: | 
|  | 53 |  | 
|  | 54 | ..code-block:: yaml | 
|  | 55 |  | 
|  | 56 | cassandra: | 
|  | 57 | backup: | 
|  | 58 | client: | 
|  | 59 | enabled: true | 
|  | 60 | full_backups_to_keep: 3 | 
|  | 61 | incr_before_full: 3 | 
|  | 62 | backup_times: | 
|  | 63 | dayOfWeek: 0 | 
|  | 64 | hour: 4 | 
|  | 65 | minute: 52 | 
|  | 66 | compression: true | 
|  | 67 | compression_threads: 2 | 
|  | 68 | database: | 
|  | 69 | user: user | 
|  | 70 | password: password | 
|  | 71 | target: | 
|  | 72 | host: host01 | 
|  | 73 |  | 
|  | 74 | .. note:: Parameters in ``backup_times`` section can be used to set up exact | 
|  | 75 | time the cron job should be executed. In this example, the backup job | 
|  | 76 | would be executed every Sunday at 4:52 AM. If any of the individual | 
|  | 77 | ``backup_times`` parameters is not defined, the defalut ``*`` value will be | 
|  | 78 | used. For example, if minute parameter is ``*``, it will run the backup every minute, | 
|  | 79 | which is ususally not desired. | 
|  | 80 | Available parameters are ``dayOfWeek``, ``dayOfMonth``, ``month``, ``hour`` and ``minute``. | 
|  | 81 | Please see the crontab reference for further info on how to set these parameters. | 
|  | 82 |  | 
|  | 83 | .. note:: Please be aware that only ``backup_times`` section OR | 
|  | 84 | ``hours_before_full(incr)`` can be defined. If both are defined, | 
|  | 85 | the ``backup_times`` section will be peferred. | 
|  | 86 |  | 
|  | 87 | .. note:: New parameter ``incr_before_full`` needs to be defined. This | 
|  | 88 | number sets number of incremental backups to be run, before a full backup | 
|  | 89 | is performed. | 
|  | 90 |  | 
|  | 91 |  | 
| Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 92 | Backup server rsync | 
|  | 93 |  | 
|  | 94 | .. code-block:: yaml | 
|  | 95 |  | 
|  | 96 | cassandra: | 
|  | 97 | backup: | 
|  | 98 | server: | 
|  | 99 | enabled: true | 
|  | 100 | hours_before_full: 24 | 
|  | 101 | full_backups_to_keep: 5 | 
|  | 102 | key: | 
|  | 103 | cassandra_pub_key: | 
|  | 104 | enabled: true | 
|  | 105 | key: ssh_rsa | 
|  | 106 |  | 
| Jiri Broulik | a6496d7 | 2018-02-28 16:21:28 +0100 | [diff] [blame] | 107 | Backup server without strict client restriction | 
|  | 108 |  | 
|  | 109 | .. code-block:: yaml | 
|  | 110 |  | 
|  | 111 | cassandra: | 
|  | 112 | backup: | 
|  | 113 | restrict_clients: false | 
|  | 114 |  | 
| Martin Polreich | 0a16510 | 2018-03-04 17:29:53 +0100 | [diff] [blame^] | 115 | Backup server at exact times: | 
|  | 116 |  | 
|  | 117 | ..code-block:: yaml | 
|  | 118 |  | 
|  | 119 | cassandra: | 
|  | 120 | backup: | 
|  | 121 | server: | 
|  | 122 | enabled: true | 
|  | 123 | full_backups_to_keep: 3 | 
|  | 124 | incr_before_full: 3 | 
|  | 125 | backup_dir: /srv/backup | 
|  | 126 | backup_times: | 
|  | 127 | dayOfWeek: 0 | 
|  | 128 | hour: 4 | 
|  | 129 | minute: 52 | 
|  | 130 | key: | 
|  | 131 | cassandra_pub_key: | 
|  | 132 | enabled: true | 
|  | 133 | key: key | 
|  | 134 |  | 
|  | 135 | .. note:: Parameters in ``backup_times`` section can be used to set up exact | 
|  | 136 | time the cron job should be executed. In this example, the backup job | 
|  | 137 | would be executed every Sunday at 4:52 AM. If any of the individual | 
|  | 138 | ``backup_times`` parameters is not defined, the defalut ``*`` value will be | 
|  | 139 | used. For example, if minute parameter is ``*``, it will run the backup every minute, | 
|  | 140 | which is ususally not desired. | 
|  | 141 | Available parameters are ``dayOfWeek``, ``dayOfMonth``, ``month``, ``hour`` and ``minute``. | 
|  | 142 | Please see the crontab reference for further info on how to set these parameters. | 
|  | 143 |  | 
|  | 144 | .. note:: Please be aware that only ``backup_times`` section OR | 
|  | 145 | ``hours_before_full(incr)`` can be defined. If both are defined, The | 
|  | 146 | ``backup_times`` section will be peferred. | 
|  | 147 |  | 
|  | 148 | .. note:: New parameter ``incr_before_full`` needs to be defined. This | 
|  | 149 | number sets number of incremental backups to be run, before a full backup | 
|  | 150 | is performed. | 
|  | 151 |  | 
| Jiri Broulik | f46f222 | 2017-07-06 13:52:32 +0200 | [diff] [blame] | 152 | Client restore from local backup: | 
|  | 153 |  | 
|  | 154 | .. code-block:: yaml | 
|  | 155 |  | 
|  | 156 | cassandra: | 
|  | 157 | backup: | 
|  | 158 | client: | 
|  | 159 | enabled: true | 
|  | 160 | full_backups_to_keep: 3 | 
|  | 161 | hours_before_full: 24 | 
|  | 162 | target: | 
|  | 163 | host: cfg01 | 
|  | 164 | restore_latest: 1 | 
|  | 165 | restore_from: local | 
|  | 166 |  | 
|  | 167 | .. 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. | 
|  | 168 |  | 
|  | 169 | Client restore from remote backup: | 
|  | 170 |  | 
|  | 171 | .. code-block:: yaml | 
|  | 172 |  | 
|  | 173 | cassandra: | 
|  | 174 | backup: | 
|  | 175 | client: | 
|  | 176 | enabled: true | 
|  | 177 | full_backups_to_keep: 3 | 
|  | 178 | hours_before_full: 24 | 
|  | 179 | target: | 
|  | 180 | host: cfg01 | 
|  | 181 | restore_latest: 1 | 
|  | 182 | restore_from: remote | 
|  | 183 |  | 
|  | 184 | .. 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. | 
|  | 185 |  | 
|  | 186 |  | 
|  | 187 |  | 
| marco | d468a04 | 2016-06-14 22:13:03 +0200 | [diff] [blame] | 188 | Read more | 
|  | 189 | ========= | 
|  | 190 |  | 
|  | 191 | * links | 
| Filip Pytloun | 74cd9c6 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 192 |  | 
|  | 193 | Documentation and Bugs | 
|  | 194 | ====================== | 
|  | 195 |  | 
|  | 196 | To learn how to install and update salt-formulas, consult the documentation | 
|  | 197 | available online at: | 
|  | 198 |  | 
|  | 199 | http://salt-formulas.readthedocs.io/ | 
|  | 200 |  | 
|  | 201 | In the unfortunate event that bugs are discovered, they should be reported to | 
|  | 202 | the appropriate issue tracker. Use Github issue tracker for specific salt | 
|  | 203 | formula: | 
|  | 204 |  | 
|  | 205 | https://github.com/salt-formulas/salt-formula-cassandra/issues | 
|  | 206 |  | 
|  | 207 | For feature requests, bug reports or blueprints affecting entire ecosystem, | 
|  | 208 | use Launchpad salt-formulas project: | 
|  | 209 |  | 
|  | 210 | https://launchpad.net/salt-formulas | 
|  | 211 |  | 
|  | 212 | You can also join salt-formulas-users team and subscribe to mailing list: | 
|  | 213 |  | 
|  | 214 | https://launchpad.net/~salt-formulas-users | 
|  | 215 |  | 
|  | 216 | Developers wishing to work on the salt-formulas projects should always base | 
|  | 217 | their work on master branch and submit pull request against specific formula. | 
|  | 218 |  | 
|  | 219 | https://github.com/salt-formulas/salt-formula-cassandra | 
|  | 220 |  | 
|  | 221 | Any questions or feedback is always welcome so feel free to join our IRC | 
|  | 222 | channel: | 
|  | 223 |  | 
|  | 224 | #salt-formulas @ irc.freenode.net |