Sys-ctl-cln-faild-bkps Role¶
Description: No description available
Variables¶
author: Kevin Veen-Birkenbach
description: Cleans up failed Docker backups by configuring a systemd service and timer to execute the cleanup operations periodically.
license: Infinito.Nexus NonCommercial License
license_url: https://s.infinito.nexus/license
company: Kevin Veen-Birkenbach
Consulting & Coaching Solutions https://www.veen.world
min_ansible_version: 2.9
platforms: [{‘name’: ‘Linux’, ‘versions’: [‘all’]}]
galaxy_tags: [‘docker’, ‘backup’, ‘cleanup’, ‘automation’]
repository: https://s.infinito.nexus/code
issue_tracker_url: https://s.infinito.nexus/issues
documentation: https://docs.infinito.nexus
README¶
Cleanup Failed Backups¶
This role installs and runs the cleanback tool to automatically detect and remove failed Docker backups.
/Backups)To avoid accidental data loss, the role keeps the most recent backups by default and runs fully unattended via a scheduled system service.
What this role does¶
Installs the cleanback cleanup tool
Runs regular, automated cleanup jobs via systemd
Removes failed backups only
Preserves the newest backups automatically
Designed for non-interactive, production-safe operation
Keeping recent backups safe¶
By default, the role keeps the last three backup sets and does not touch them during cleanup runs.
This behavior is controlled via:
CLEANUP_FAILED_BACKUPS_FORCE_KEEP
Example:
CLEANUP_FAILED_BACKUPS_FORCE_KEEP: 3
This means:
The newest 3 backup directories under
PATH_INFINITO_BACKUP_DIRare skippedOlder backups are checked and cleaned if they are invalid
The value can be adjusted or overridden via inventory, group vars, or host vars if needed.
cleanback tool¶
The cleanup logic itself is provided by the cleanback project:
https://github.com/kevinveenbirkenbach/cleanup-failed-backups
This role focuses on safe automation and scheduling, while the linked project contains the actual cleanup implementation.
Typical use case¶
This role is intended for servers that create regular Docker backups and need a reliable way to:
Keep storage usage under control
Automatically remove broken or incomplete backups
Ensure recent backups are never touched
No manual interaction is required once the role is deployed.