
Backup Proxmox Config Every Night
I mounted a drive on /mnt/backups where Promox backup all my VMs and LXCs to on a weekly basis, and then once per week these backups are copied off site using rclone.
Read more about my rclone setup here: https://techstuff.leighonline.net/2025/01/03/proxmox-rclone-offsite-backups/
But Promox doesn’t have a mechanism to backup its own config, so I came up with an idea to just back it up via cron to /mtn/backups so my rclone will copy that off site as well.
Cron Commands
Add this one line to take the backups:
11 7 * * 5 tar -czvf /mnt/backups/dump/proxmox-config-$(date +\%F).tar.gz /etc/pve /etc/network/interfaces /etc/hosts >/dev/null 2>&1
And then another one liner to delete old files:
12 7 * * 5 find /mnt/backups/dump/ -name "proxmox-config-*.tar.gz" -type f -mtime +22 -delete
To see if there are any files in your tar file you can run this command:
tar -tvf /mnt/backups/dump/proxmox-config-$(date +%F).tar.gz | head -n 20
You will now see those files in the Promox GUI
