From a451843b85d18785b52d891cbbfe2a47eae0a3e7 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+sporqist@users.noreply.github.com> Date: Mon, 1 May 2023 16:07:56 +0000 Subject: [PATCH] Archiviere das Backup --- handlers/backup.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/handlers/backup.yaml b/handlers/backup.yaml index 8eee21b..746b357 100644 --- a/handlers/backup.yaml +++ b/handlers/backup.yaml @@ -18,11 +18,13 @@ when: docker_compose_stat.stat.exists is defined and docker_compose_stat.stat.exists - name: Backup Gitea Directory - ansible.posix.synchronize: - src: /opt/gitea/ - dest: "/var/backups/gitea-{{ gitea.hostname }}.{{ gitea.domain }}@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}" - recursive: true - delegate_to: "{{ inventory_hostname }}" + community.general.archive: + path: /opt/gitea/ + dest: "/var/backups/gitea-{{ gitea.hostname }}.{{ gitea.domain }}@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}.tar.gz" + force_archive: true + format: gz + owner: root + mode: "400" listen: - Backup Gitea register: backup