age backups everywhere

This commit is contained in:
counterweight 2026-09-12 16:20:42 +02:00
parent 27e036eccd
commit 394f2519ff
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
11 changed files with 200 additions and 15 deletions

View file

@ -0,0 +1,25 @@
---
# Forgejo backup: dumps locally on vipy, encrypted with age.
#
# The biggest artefact in the estate (~2.7 G) and the reason retention here is
# short: 7 days locally would be 19 G of vipy's 36 G free. The box keeps 14.
# Forgejo is sqlite3 (DB_TYPE in app.ini), so it is stopped for the dump — the
# old job did the same.
- name: Configure the Forgejo backup on the edge host
hosts: edge
become: yes
vars_files:
- ../../group_vars/all/main.yml
- ./forgejo_vars.yml
tasks:
- name: Ensure Forgejo dumps itself, encrypted, on a timer
ansible.builtin.include_role:
name: backup_source
vars:
backup_source_name: forgejo
backup_source_description: "Forgejo"
backup_source_dump_command: "tar -czf - -C / var/lib/forgejo etc/forgejo"
backup_source_stop_service: forgejo
backup_source_retention_days: 2
backup_source_on_calendar: "*-*-* 02:30:00"