reduce backup downtime: restart before rsync transfer

This commit is contained in:
2026-07-27 14:33:04 -04:00
parent 0b70d6e919
commit 400fa84389
4 changed files with 18 additions and 3 deletions
+7
View File
@@ -6,6 +6,11 @@ A flexible Ansible role for deploying and managing Docker Compose applications w
This role provides a standardized way to deploy containerized applications using Docker Compose. It handles directory creation, template rendering, and container lifecycle management.
## Requirements
- Collections: `community.docker` (>=1.10.0) and `ansible.posix` (>=1.4.0). Both are declared as collection dependencies and installed automatically with the collection.
- The backup workflow copies archives to the controller with `ansible.posix.synchronize`, so **`rsync` must be installed on both the controller and the managed host**.
## Features
- **Template-based deployment** with Jinja2 templating
@@ -120,6 +125,8 @@ dependencies:
app_backup_stop_services: true # Stop containers during backup
```
When `app_backup_stop_services` is enabled the containers are stopped only while the tarball is created on the managed host, then restarted immediately — the transfer of the archive back to the controller (via rsync) happens after the application is running again, so downtime is limited to the snapshot itself.
#### Automated Backups
For scheduled backups: