LIMEHAWK - Managed IT
Proxmox Config Backups — infrastructure
dateJan 31, 2025
statusIMPLEMENTED
Summary

Deployed automated monthly backup solution for Proxmox VE host configurations using bash script and cron.monthly. Backs up critical system directories to centralized SMB share with 6-month retention. Ensures rapid disaster recovery without relying on VM-level backups for host configuration.

The Challenge

Proxmox VE provides excellent built-in backup solutions for VMs and containers, but host-level configuration is often overlooked. If a Proxmox host fails catastrophically, you need:

networkbridges, bonds, VLANs
scriptscustom automation in /root and /opt
clustercertificates and membership data
storagemount points and credentials
system/etc customizations

Without host-level backups, rebuilding a failed Proxmox node means manually reconfiguring everything from memory or outdated documentation.

Solution Architecture

A bash script runs monthly via cron.monthly, creating timestamped tar archives of critical directories and storing them on a network SMB share.

monthly executionvia cron
centralized storageSMB share accessible by all hosts
timestampedpoint-in-time recovery
auto retentionkeeps latest 6, deletes older
loggingaudit trail in /var/log
pre-flight checkverifies SMB mount availability
Directories Backed Up
/etcsystem configs: network bridges, storage mounts, services
/rootadmin home: custom scripts, SSH keys, tooling
/optthird-party: monitoring agents, custom apps
/var/lib/pve-clustercluster data: VM configs, permissions, datacenter settings
Backup Script

Script placed in /etc/cron.monthly/ runs automatically on the first of each month.

pre-flightverifies SMB mount (exits if not)
tar archivestimestamped per directory
--ignore-failed-readcontinues if files locked
auto cleanupkeeps 6 most recent per dir
File Naming

Format: {hostname}_{directory}_{timestamp}.tgz

proxmox01_etc_2025-01-28_11-06-13PM.tgz

proxmox01_root_2025-01-28_11-06-13PM.tgz

proxmox01_opt_2025-01-28_11-06-13PM.tgz

proxmox01_pve-cluster_2025-01-28_11-06-13PM.tgz

Implementation Steps

1. mount SMB share

add to /etc/fstab for persistence

verify: ls /mnt/pve/proxmox_hosts

2. install script

nano /etc/cron.monthly/proxmox_config_to_nas

chmod +x /etc/cron.monthly/proxmox_config_to_nas

3. test manually

/etc/cron.monthly/proxmox_config_to_nas

cat /var/log/proxmox_config_backup.log

4. verify cron

scripts in /etc/cron.monthly/ run automatically

fallback: add to crontab manually

Security: Use credentials file instead of plaintext password in fstab. Create /root/.smbcredentials with permissions 600.

Multi-Host Deployment

Script uses $(hostname) to namespace backups automatically. Deploy the same script to all Proxmox servers without modification.

single scriptworks across entire cluster
auto-organizedbackups sorted by hostname
centralizedone location for all hosts
independenteach host manages own retention
Outcome

Fully automated host configuration backup solution running across multiple Proxmox nodes. Monthly backups provide 6 months of retention with automatic cleanup.

maintenancezero ongoing
rebuild capabilityrapid (restore /etc, /root, cluster)
cluster-wideno per-host customization
VM backups useless if you can't rebuild the host
network config and cluster data are critical
simple bash + cron beats complex backup solutions
timestamped archives enable audit and rollback
Get Help

Need disaster recovery planning? We design backup strategies that work when you need them - host configs, VMs, databases - all automated and tested.