TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/IsaiasCarrion/Homelab/llms.txt
Use this file to discover all available pages before exploring further.
scripts/ directory contains three shell scripts that handle the most repetitive operational tasks in the homelab: backing up Docker volumes and Proxmox resources, cleaning up unused Docker objects, and keeping the host inventory files up to date. Running these regularly keeps the environment lean, documented, and recoverable.
Available Scripts
| Script | Purpose |
|---|---|
backup.sh | Automated backups of Docker volumes and Proxmox resources |
prune_docker.sh | Docker resource cleanup — containers, images, networks, and volumes |
update_hosts.sh | Inventory update — regenerates the host list under inventory/ |
backup.sh
backup.sh automates the process of persisting stateful data from the homelab to the dedicated 1 TB HDD mounted at /mnt/hdd-backup. It targets both Docker volumes (the persistent data layer for running containers) and Proxmox-managed resources such as VM and LXC container backups. Running this script on a regular schedule ensures that a point-in-time recovery is always available without requiring any manual intervention.
The backup destination is organized under /mnt/hdd-backup/docker/ with sub-directories for volumes, stacks, and other Docker artefacts, keeping each category of data clearly separated and easy to restore individually.
prune_docker.sh
Over time, Docker accumulates stopped containers, dangling images, orphaned networks, and unused volumes that consume disk space without serving any active workload.prune_docker.sh removes all of these in one pass, keeping the Docker VM’s filesystem from filling up between deployments.
The script leverages Docker’s built-in prune subcommands:
update_hosts.sh
update_hosts.sh refreshes the host inventory files stored under inventory/. As new LXC containers or VMs are provisioned in Proxmox (or decommissioned), the inventory can drift out of sync with reality. This script brings inventory/hosts.md and related files back in line with the current state of the network, making the documentation an accurate reflection of what is actually running.
Scheduling with Cron
Add entries to the crontab on the Docker VM (edit withcrontab -e). The schedule and absolute path to the scripts/ directory will vary depending on where the repository is cloned. The entries below are illustrative — adjust the timing and path to suit your environment: