diff --git a/backupninja/client.sls b/backupninja/client.sls index 7760800..98131f8 100644 --- a/backupninja/client.sls +++ b/backupninja/client.sls @@ -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: diff --git a/backupninja/files/rsync.conf b/backupninja/files/rsync.conf index d45b350..65e066d 100644 --- a/backupninja/files/rsync.conf +++ b/backupninja/files/rsync.conf @@ -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 @@ -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 @@ -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 %} diff --git a/backupninja/map.jinja b/backupninja/map.jinja index 2a5db08..a95e808 100644 --- a/backupninja/map.jinja +++ b/backupninja/map.jinja @@ -1,4 +1,3 @@ - {% set client = salt['grains.filter_by']({ 'Debian': { 'pkgs': ['backupninja', 'debconf-utils', 'bsd-mailx', 'python-boto'],