openpunk-ansible/roles/gitea/tasks/backup.yml

26 lines
477 B
YAML
Raw Normal View History

---
- name: Stop Gitea
systemd:
name: gitea
enabled: yes
state: stopped
- name: Dump Gitea
shell:
cmd: gitea dump -c /etc/gitea/app.ini --work-path=/etc/gitea --file=gitea-dump.zip
chdir: /etc/gitea
become: true
become_method: su
become_user: gitea
- name: Start Gitea
systemd:
name: gitea
enabled: yes
state: started
- name: Fetch backup
fetch:
src: /etc/gitea/gitea-dump.zip
2023-02-02 22:04:44 +00:00
dest: backups/gitea-dump.zip
flat: true