mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized .mds and meta/main.yml for cleanup roles
This commit is contained in:
7
roles/cleanup-backups-service/Administration.md
Normal file
7
roles/cleanup-backups-service/Administration.md
Normal file
@@ -0,0 +1,7 @@
|
||||
It may be neccessary to install gcc seperat to use psutil
|
||||
|
||||
```bash
|
||||
sudo pacman -S gcc
|
||||
```
|
||||
|
||||
If this is the case in the future, automize it in this role.
|
@@ -1,14 +1,27 @@
|
||||
# role cleanup-backups-timer
|
||||
# Cleanup Backups Service
|
||||
|
||||
Cleans up old backups
|
||||
## Description
|
||||
|
||||
## Additional software
|
||||
This role automates the cleanup of old backups by executing a Python script that deletes outdated backup versions based on disk usage thresholds. It ensures that backup storage does not exceed a defined usage percentage.
|
||||
|
||||
It may be neccessary to install gcc seperat to use psutil
|
||||
## Overview
|
||||
|
||||
```bash
|
||||
sudo pacman -S gcc
|
||||
```
|
||||
Optimized for effective disk space management, this role:
|
||||
- Installs required packages (e.g. [lsof](https://en.wikipedia.org/wiki/Lsof) and [psutil](https://pypi.org/project/psutil/)) using pacman.
|
||||
- Creates a directory for storing cleanup scripts.
|
||||
- Deploys a Python script that deletes old backup directories when disk usage is too high.
|
||||
- Configures a systemd service to run the cleanup script, with notifications via [systemd-notifier](../systemd-notifier/README.md).
|
||||
|
||||
## further information
|
||||
## Purpose
|
||||
|
||||
The primary purpose of this role is to maintain optimal backup storage by automatically removing outdated backup versions when disk usage exceeds a specified threshold.
|
||||
|
||||
## Features
|
||||
|
||||
- **Automated Cleanup:** Executes a Python script to delete old backups.
|
||||
- **Threshold-Based Deletion:** Removes backups based on disk usage percentage.
|
||||
- **Systemd Integration:** Configures a systemd service to run cleanup tasks.
|
||||
- **Dependency Integration:** Works in conjunction with related roles for comprehensive backup management.
|
||||
|
||||
## Further Information
|
||||
- https://stackoverflow.com/questions/48929553/get-hard-disk-size-in-python
|
@@ -1,3 +1,26 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: "Automates the cleanup of old backups by executing a Python script that deletes outdated backup versions when disk usage exceeds a specified threshold."
|
||||
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: Linux
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- backup
|
||||
- cleanup
|
||||
- disk
|
||||
- automation
|
||||
repository: "https://s.veen.world/cymais"
|
||||
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
||||
documentation: "https://s.veen.world/cymais"
|
||||
dependencies:
|
||||
- python-pip
|
||||
- systemd-notifier
|
||||
|
Reference in New Issue
Block a user