Skip to content
Snippets Groups Projects
Commit 783924e6 authored by sgmitchell's avatar sgmitchell Committed by Matthew Mosesohn
Browse files

Change backup handler to only run v2 data backup if snap directory exists (#1594)

parent 93304e5f
Branches
Tags
No related merge requests found
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
- Refresh Time Fact - Refresh Time Fact
- Set Backup Directory - Set Backup Directory
- Create Backup Directory - Create Backup Directory
- Stat etcd v2 data directory
- Backup etcd v2 data - Backup etcd v2 data
- Backup etcd v3 data - Backup etcd v3 data
when: etcd_cluster_is_healthy.rc == 0 when: etcd_cluster_is_healthy.rc == 0
...@@ -24,7 +25,13 @@ ...@@ -24,7 +25,13 @@
group: root group: root
mode: 0600 mode: 0600
- name: Stat etcd v2 data directory
stat:
path: "{{ etcd_data_dir }}/member"
register: etcd_data_dir_member
- name: Backup etcd v2 data - name: Backup etcd v2 data
when: etcd_data_dir_member.stat.exists
command: >- command: >-
{{ bin_dir }}/etcdctl backup {{ bin_dir }}/etcdctl backup
--data-dir {{ etcd_data_dir }} --data-dir {{ etcd_data_dir }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment