From 5756eb33b990d047474ff1ed78d27485c9763663 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 14 Mar 2025 11:41:48 +0100 Subject: [PATCH] Optimized .mds and meta/main.yml for backup-docker-to-local --- roles/backup-docker-to-local/README.md | 26 ++++++++++++++++++++++ roles/backup-docker-to-local/meta/main.yml | 24 ++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 roles/backup-docker-to-local/README.md diff --git a/roles/backup-docker-to-local/README.md b/roles/backup-docker-to-local/README.md new file mode 100644 index 00000000..6481b9ff --- /dev/null +++ b/roles/backup-docker-to-local/README.md @@ -0,0 +1,26 @@ +# 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 repository](https://github.com/kevinveenbirkenbach/backup-docker-to-local.git), 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: +- [backup-directory-validator](../backup-directory-validator/) – Validates backup directories. +- [cleanup-failed-docker-backups](../cleanup-failed-docker-backups/) – Cleans up unsuccessful backup attempts. +- [systemd-timer](../systemd-timer/) – Schedules recurring backup tasks. +- [backups-provider](../backups-provider/) – Manages backup sources. +- [system-maintenance-lock](../system-maintenance-lock/) – Ensures coordinated maintenance operations. + +## 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 repository](https://github.com/kevinveenbirkenbach/backup-docker-to-local.git). +- **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. diff --git a/roles/backup-docker-to-local/meta/main.yml b/roles/backup-docker-to-local/meta/main.yml index 319b42db..28706126 100644 --- a/roles/backup-docker-to-local/meta/main.yml +++ b/roles/backup-docker-to-local/meta/main.yml @@ -1,3 +1,27 @@ +--- +galaxy_info: + author: "Kevin Veen-Birkenbach" + description: "Automates the backup of Docker volumes to a local folder" + license: "CyMaIS NonCommercial License (CNCL)" + license_url: "https://s.veen.world/cncl" + company: | + Kevin Veen-Birkenbach + Consulting & Coaching Solutions + https://www.veen.world + min_ansible_version: "2.9" + platforms: + - name: Archlinux + versions: + - rolling + galaxy_tags: + - backup + - docker + - local + - systemd + - automation + repository: "https://s.veen.world/cymais" + issue_tracker_url: "https://s.veen.world/cymaisissues" + documentation: "https://s.veen.world/cymais" dependencies: - git - backups-provider