blob: f23e2b999ee9091ddb4818d09ffad5ba5a723578 [file] [log] [blame]
==================================
cassandra
==================================
Service cassandra description
Sample pillars
==============
Single cassandra service
.. code-block:: yaml
cassandra:
server:
enabled: true
version: icehouse
Backup client with ssh/rsync remote host
.. code-block:: yaml
cassandra:
backup:
client:
enabled: true
full_backups_to_keep: 3
hours_before_full: 24
target:
host: cfg01
home_dir: server-home-dir
.. note:: full_backups_to_keep param states how many backup will be stored locally on cassandra client.
More options to relocate local backups can be done using salt-formula-backupninja.
Backup client container with ssh/rsync remote host
.. code-block:: yaml
cassandra:
backup:
client:
enabled: true
full_backups_to_keep: 3
hours_before_full: 24
containers:
- opencontrail_controller_1
target:
host: cfg01
home_dir: server-home-dir
Backup client with local backup only
.. code-block:: yaml
cassandra:
backup:
client:
enabled: true
full_backups_to_keep: 3
hours_before_full: 24
.. note:: full_backups_to_keep param states how many backup will be stored locally on cassandra client
Backup client at exact times:
..code-block:: yaml
cassandra:
backup:
client:
enabled: true
full_backups_to_keep: 3
incr_before_full: 3
backup_times:
day_of_week: 0
hour: 4
minute: 52
compression: true
compression_threads: 2
database:
user: user
password: password
target:
host: host01
.. note:: Parameters in ``backup_times`` section can be used to set up exact
time the cron job should be executed. In this example, the backup job
would be executed every Sunday at 4:52 AM. If any of the individual
``backup_times`` parameters is not defined, the defalut ``*`` value will be
used. For example, if minute parameter is ``*``, it will run the backup every minute,
which is ususally not desired.
Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``.
Please see the crontab reference for further info on how to set these parameters.
.. note:: Please be aware that only ``backup_times`` section OR
``hours_before_full(incr)`` can be defined. If both are defined,
the ``backup_times`` section will be peferred.
.. note:: New parameter ``incr_before_full`` needs to be defined. This
number sets number of incremental backups to be run, before a full backup
is performed.
Backup server rsync
.. code-block:: yaml
cassandra:
backup:
server:
enabled: true
hours_before_full: 24
full_backups_to_keep: 5
key:
cassandra_pub_key:
enabled: true
key: ssh_rsa
Backup server without strict client restriction
.. code-block:: yaml
cassandra:
backup:
restrict_clients: false
Backup server at exact times:
..code-block:: yaml
cassandra:
backup:
server:
enabled: true
full_backups_to_keep: 3
incr_before_full: 3
backup_dir: /srv/backup
backup_times:
day_of_week: 0
hour: 4
minute: 52
key:
cassandra_pub_key:
enabled: true
key: key
.. note:: Parameters in ``backup_times`` section can be used to set up exact
time the cron job should be executed. In this example, the backup job
would be executed every Sunday at 4:52 AM. If any of the individual
``backup_times`` parameters is not defined, the defalut ``*`` value will be
used. For example, if minute parameter is ``*``, it will run the backup every minute,
which is ususally not desired.
Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``.
Please see the crontab reference for further info on how to set these parameters.
.. note:: Please be aware that only ``backup_times`` section OR
``hours_before_full(incr)`` can be defined. If both are defined, The
``backup_times`` section will be peferred.
.. note:: New parameter ``incr_before_full`` needs to be defined. This
number sets number of incremental backups to be run, before a full backup
is performed.
Client restore from local backup:
.. code-block:: yaml
cassandra:
backup:
client:
enabled: true
full_backups_to_keep: 3
hours_before_full: 24
target:
host: cfg01
restore_latest: 1
restore_from: local
.. 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.
Client restore from remote backup:
.. code-block:: yaml
cassandra:
backup:
client:
enabled: true
full_backups_to_keep: 3
hours_before_full: 24
target:
host: cfg01
restore_latest: 1
restore_from: remote
.. 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.
Client restore container from remote backup:
.. code-block:: yaml
cassandra:
backup:
client:
enabled: true
full_backups_to_keep: 3
hours_before_full: 24
containers:
- opencontrail_controller_1
target:
host: cfg01
restore_latest: 1
restore_from: remote
Read more
=========
* links