This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.
The script will create backups using tar
with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.
To create backup script that will be executed every day we can create backup script in /etc/cron.daily/
folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:
touch /etc/cron.daily/pvehost-backup