[FIX] Repariere den Backup-Wiederherstellungsprozess

This commit is contained in:
2023-04-29 19:52:00 +00:00
parent c391a07485
commit 6817fe0ff9
2 changed files with 53 additions and 19 deletions

View File

@@ -1,3 +1,25 @@
- name: Stop Gitea for Backup
community.docker.docker_compose:
project_src: /opt/gitea
state: present
stopped: true
ignore_errors: true
listen:
- Backup Gitea
notify:
- Ensure Gitea is running
- name: Backup Gitea Directory
ansible.builtin.copy:
src: /opt/gitea/
dest: "/opt/gitea.backup@{{ lookup('pipe', 'date --utc --iso-8601=seconds') }}"
mode: preserve
remote_src: true
directory_mode: true
listen:
- Backup Gitea
register: backup
- name: Ensure Gitea is running
community.docker.docker_compose:
project_src: /opt/gitea