--- # Jar Lid Archive backup: the database and the photo store, as ONE artefact, # dumped and age-encrypted on the box itself. small-backups-box pulls it. # # Only `web` is stopped. It is the only writer to both the database and the # photo store, so with it down both are quiescent and are captured at the same # instant - no row points at a photo the tar lacks. db stays up for pg_dump. # # storage is deliberately NOT stopped, though an earlier version did: on this # VM's contended HDD-backed disk SeaweedFS can take minutes to come back, and the # first test run left the app down for 26 minutes waiting on it. - name: Configure the Jar Lid Archive backup on its own host hosts: jar_lid_archive become: yes tasks: - name: Ensure Jar Lid Archive dumps itself, encrypted, on a timer ansible.builtin.include_role: name: backup_source vars: backup_source_name: "{{ jar_lid_archive_instance }}" backup_source_description: "Jar Lid Archive ({{ jar_lid_archive_instance }})" backup_source_dump_command: /usr/local/bin/jar-lid-archive-dump.sh # Uncompressed: the bulk is JPEGs. See roles/jar_lid_archive/templates/dump.sh.j2. backup_source_artifact_suffix: "tar.age" backup_source_stop_command: "docker compose -f /opt/jar-lid-archive/docker-compose.yml stop web" # `up -d --wait`, not `start`: it also repairs a db or storage that died # meanwhile, and only returns once /health/ passes. backup_source_start_command: "docker compose -f /opt/jar-lid-archive/docker-compose.yml up -d --wait --wait-timeout 300" backup_source_retention_days: "{{ jar_lid_archive_backup_retention_days }}" backup_source_on_calendar: "*-*-* 02:20:00" # Reported to Gatus as backup-dump_. backup_source_push_url: "https://{{ subdomains.gatus }}.{{ root_domain }}/api/v1/endpoints/backup-dump_{{ jar_lid_archive_instance }}/external" backup_source_push_token: "{{ gatus_push_tokens[inventory_hostname] }}"