Skip to content

Commit

Permalink
Add posibility turn of mysql backup for specific nodes, fix rsync cre…
Browse files Browse the repository at this point in the history
…ating remote directories,

   add import vars revquired for loading cassandra service_grains
  • Loading branch information
Oleksandr Vlasov committed May 12, 2017
1 parent dcbf3e4 commit f3bfce9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion backupninja/client.sls
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ backupninja_postgresql_handler:
{%- endif %}
{%- if pillar.mysql is defined %}
{%- if pillar.mysql is defined and pillar.mysql.get('_support', {}).get('backupninja', {}).get('enabled', False) %}
backupninja_mysql_handler:
file.managed:
Expand Down
14 changes: 7 additions & 7 deletions backupninja/files/rsync.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
# just use this option if your data is backed up in a separate partition and
# you want backupninja to fsck it; this option will just be used if fscheck
# (see below) is set to 'yes'
#partition =
#partition =

# set to 1 if fsck should run on partition after the backup is made
#fscheck =
#fscheck =

# set to 1 if partition is mounted read-only
#read_only =
#read_only =

# backup partition mountpoint or backup main folder
# this doesn't need to be a real partition, but should be at least the
Expand All @@ -40,15 +40,15 @@ backupdir = {{ system.name }}.{{ system.domain }}
# if you want to have incremental backups for longer periods (like months) you
# have to configure rotations for 30 or more using the "days" parameter at the
# [general] section in the handler config.
#
#
# The short format is better described here:
# http://www.mikerubel.org/computers/rsync_snapshots/#Incremental
#
#
# The long format is inspired by the maildir handler and allows keeping backups
# of longer periods (weeks and months) using less rotations as it stores
# the increments in folders like daily.1, weekly.1, monthly.1 and has three
# rotation parameters:
#
#
# keepdaily = number of daily backup increments
# keepweekly = number of weekly backup increments
# keepmonthly = number of monthly backup increments
Expand Down Expand Up @@ -199,7 +199,7 @@ id_file = /root/.ssh/id_rsa

# remote rsync program (remote dest only)
{%- if grains.os == 'Ubuntu' and grains.osrelease >= '14.04' %}
# remote_rsync = '{% for backup_name, backup in service_grains.backupninja.backup.iteritems() %}{% for fs_include in backup.get('fs_includes', []) %}mkdir -p /srv/backupninja/{{ network.fqdn }}{{ fs_include }};{% endfor %}{% endfor %} rsync'
remote_rsync = '{% for backup_name, backup in service_grains.backupninja.backup.iteritems() %}{% for fs_include in backup.get('fs_includes', []) %} mkdir -p /srv/backupninja/{{ network.fqdn }}{{ fs_include }};{% endfor %}{% endfor %} rsync'
{%- else %}
#remote_rsync = rsync
{%- endif %}
Expand Down
1 change: 1 addition & 0 deletions backupninja/map.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{%- from "linux/map.jinja" import system with context %}

{% set client = salt['grains.filter_by']({
'Debian': {
Expand Down

0 comments on commit f3bfce9

Please sign in to comment.