From 9a41fefce6731ce1fcc03301091d94df92c763c2 Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Thu, 24 Apr 2025 11:18:00 +0200 Subject: [PATCH] Change volume names for backup on minisforum. --- minisforum.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/minisforum.yaml b/minisforum.yaml index e2c1d74..d4208c9 100644 --- a/minisforum.yaml +++ b/minisforum.yaml @@ -53,14 +53,10 @@ label: "{{ item[1].name }}" - name: Create backup of volume and store to backup directory - shell: tar cfz {{ backup_location }}{{ item[0].name }}/{{ item[1] }}.tar.gz -C /var/lib/docker/volumes/{{ item[1] }}/ _data + shell: tar cfz {{ backup_location }}{{ item[0].name }}/{{ item[1] }}-volume-{{ ansible_date_time.iso8601_basic_short }}.tar.gz -C /var/lib/docker/volumes/{{ item[1] }}/ _data become: yes become_method: sudo become_user: root - #ansible.builtin.debug: - # msg: - # - '{{ item[1] }}' # Volume name - # - '{{ item[0].name }}' # Container name loop: "{{ containers | subelements('volumes', skip_missing=True) }}" loop_control: label: "{{ item[1] }}"