From 561c347d54c3a124f64b54eedbf6d2d56fb07c34 Mon Sep 17 00:00:00 2001
From: Devan Goodwin <dgoodwin@redhat.com>
Date: Fri, 30 Oct 2015 09:41:12 -0300
Subject: Generate timestamped etcd backups.

---
 playbooks/adhoc/upgrades/upgrade.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/playbooks/adhoc/upgrades/upgrade.yml b/playbooks/adhoc/upgrades/upgrade.yml
index 948a320a2..11d89a3da 100644
--- a/playbooks/adhoc/upgrades/upgrade.yml
+++ b/playbooks/adhoc/upgrades/upgrade.yml
@@ -11,10 +11,10 @@
   hosts: masters
   vars:
     embedded_etcd: "{{ openshift.master.embedded_etcd }}"
+    timestamp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"
   roles:
   - openshift_facts
   tasks:
-  - debug: var=etcd_data_dir
   - name: Check available disk space for etcd backup
     # We assume to be using the data dir for all backups.
     shell: >
@@ -33,7 +33,7 @@
   - name: Install etcd (for etcdctl)
     yum: pkg=etcd state=latest
   - name: Generate etcd backup
-    command: etcdctl backup
+    command: etcdctl backup --data-dir={{ openshift.master.etcd_data_dir }} --backup-dir={{ openshift.common.data_dir }}/etcd-backup-{{ timestamp }}
   - fail: msg="All done for now."
 
 - name: Re-Run cluster configuration to apply latest configuration changes
-- 
cgit v1.2.3