From 669be72a147559da75dd149948700b76dd8a4fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=83=82=E6=B3=A5=E8=A1=8C=E5=A4=A9=E4=B8=8B?= Date: Wed, 9 Sep 2020 10:03:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96etcd=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 23.backup.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/23.backup.yml b/23.backup.yml index 80246c2..847c4f4 100644 --- a/23.backup.yml +++ b/23.backup.yml @@ -28,10 +28,13 @@ - debug: var="RUNNING_NODE.stdout" + - name: get current time + set_fact: temp="{{lookup('pipe','date \"+%Y%m%d_%H%M\"')}}" + # step2: backup data on the healthy member - name: make a backup on etcd node shell: "mkdir -p /etcd_backup && cd /etcd_backup && \ - ETCDCTL_API=3 {{ bin_dir }}/etcdctl snapshot save snapshot.db" + ETCDCTL_API=3 {{ bin_dir }}/etcdctl snapshot save snapshot_{{ temp }}.db" args: warn: false delegate_to: "{{ RUNNING_NODE.stdout }}"