summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/backup.yml9
1 files changed, 7 insertions, 2 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
index 347621a14..31a6c6c66 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
@@ -85,10 +85,15 @@
path: "{{ openshift.etcd.etcd_data_dir }}/member/snap/db"
register: v3_db
+ - name: Ensure v3 backup directory exists
+ file:
+ path: "{{ openshift.common.data_dir }}/etcd-backup-{{ backup_tag | default('') }}{{ timestamp }}/member/snap"
+ state: directory
+
- name: Copy etcd v3 data store
command: >
- cp -a {{ openshift.etcd.etcd_data_dir }}/member/snap
- {{ openshift.common.data_dir }}/etcd-backup-{{ backup_tag | default('') }}{{ timestamp }}/member/
+ cp -a {{ openshift.etcd.etcd_data_dir }}/member/snap/db
+ {{ openshift.common.data_dir }}/etcd-backup-{{ backup_tag | default('') }}{{ timestamp }}/member/snap/
when: v3_db.stat.exists
- set_fact: