Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add posibility turn of mysql backup for specific nodes, #1

Merged
merged 1 commit into from
May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 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