Skip to content

Commit

Permalink
Merge pull request #1 from avlasov-mos-de/master
Browse files Browse the repository at this point in the history
Add posibility turn of mysql backup for specific nodes,
  • Loading branch information
epcim authored May 22, 2018
2 parents da1f2f1 + 5b96039 commit 9e14077
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backupninja/client.sls
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,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 @@ -24,13 +24,13 @@ when = {{ time }}
# 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 @@ -50,15 +50,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 @@ -213,7 +213,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: 0 additions & 1 deletion backupninja/map.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{% set client = salt['grains.filter_by']({
'Debian': {
'pkgs': ['backupninja', 'debconf-utils', 'bsd-mailx', 'python-boto'],
Expand Down

0 comments on commit 9e14077

Please sign in to comment.