Archiviere das Backup
This commit is contained in:
parent
283d63a37a
commit
a451843b85
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user