Browse Source

parametrize backup server side dir

PROD-18191

Change-Id: I15c2cc66f0c0010408863b46c0dccf84730f31d9
pull/73/head
Jiri Broulik 6 years ago
parent
commit
3e28164df7
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      README.rst
  2. +2
    -2
      salt/files/restore_master.sh

+ 1
- 0
README.rst View File

@@ -225,6 +225,7 @@ Salt master backup configuration
backup: true
initial_data:
engine: backupninja
home_dir: remote-backup-home-dir
source: backup-node-host
host: original-salt-master-id


+ 2
- 2
salt/files/restore_master.sh View File

@@ -4,8 +4,8 @@
{%- if master.initial_data is defined %}
mkdir -p /etc/salt/pki.bak
mv /etc/salt/pki/* /etc/salt/pki.bak
scp -r backupninja@{{ master.initial_data.source }}:/srv/backupninja/{{ master.initial_data.host }}/etc/salt/pki/pki.0/* /etc/salt/pki
scp -r backupninja@{{ master.initial_data.source }}:{{ master.initial_data.get('home_dir', '/srv/backupninja') }}/{{ master.initial_data.host }}/etc/salt/pki/pki.0/* /etc/salt/pki
{%- if master.pillar.engine == 'reclass' or (master.pillar.engine == 'composite' and master.pillar.reclass is defined) %}
scp -r backupninja@{{ master.initial_data.source }}:/srv/backupninja/{{ master.initial_data.host }}/srv/salt/reclass/reclass.0/* /srv/salt/reclass
scp -r backupninja@{{ master.initial_data.source }}:{{ master.initial_data.get('home_dir', '/srv/backupninja') }}/{{ master.initial_data.host }}/srv/salt/reclass/reclass.0/* /srv/salt/reclass
{%- endif %}
{%- endif %}

Loading…
Cancel
Save