Files
computer-playbook/roles/sys-ctl-bkp-docker-2-loc
Kevin Veen-Birkenbach 23353ac878 infra(sys-service): centralize async control + pre-deploy backup safeguard
- Added MODE_BACKUP to trigger backup before the rest of the deployment

- sys-ctl-bkp-docker-2-loc: force linear sync and force flush when MODE_BACKUP is true

- Unified name resolution via system_service_name across handlers and tasks

- Introduced system_service_force_linear_sync and system_service_force_flush (rename from system_force_flush)

- Drive async/poll via system_service_async/system_service_poll using omit when disabled

- Propagated per-role overrides (cleanup, repair, cert tasks) for clarity and safety

- Minor formatting and consistency cleanups

Why: Ensure the backup runs before the deployment routine to safeguard data integrity.

Refs: Conversation https://chatgpt.com/share/68de4c41-b6e4-800f-85cd-ce6949097b5e
Signed-off-by: Kevin Veen-Birkenbach <kevin@veen.world>
2025-10-02 11:58:23 +02:00
..

Backup Docker to Local

Description

This Ansible role automates the process of backing up Docker volumes to a local folder. It pulls the backup-docker-to-local, installs required software, configures systemd services for both standard and "everything" backup modes, and seeds backup database entries as needed.

Overview

Optimized for Archlinux, this role ensures that Docker volume backups are performed reliably with minimal manual intervention. It integrates with several dependent roles to verify backup success and manage related tasks, including:

Purpose

Backup Docker Volumes to Local is a comprehensive solution that leverages rsync to create incremental backups of Docker volumes, providing seamless recovery for both file and database data. Ideal for ensuring the integrity and security of your container data, this role sets up the necessary environment to safeguard your Docker volumes.

Features

  • Required Software Installation: Installs necessary packages (e.g., lsof, python-pandas) via pacman.
  • Git Repository Pull: Automatically pulls the latest version of the backup-docker-to-local.
  • Systemd Service Configuration: Deploys and reloads two systemd service templates to manage backup tasks.
  • Database Seeding: Includes tasks to seed and manage a backup database (databases.csv) for tracking backup details.
  • Dependency Integration: Works in conjunction with the dependent roles listed above to verify and manage backups.