Backup Proxmox (single node, but including VM's!) with sanoid/syncoid on a schedule
First of all, I only use a one node Proxmox server meaning all my data is in a single pool. If you use multiple nodes this is probably more complex...
I already backup my Ubuntu computer running ZFS using sanoid/syncoid so the most efficient way for me to back up Proxmox is just repeat that behavior.
Follow the installation instructions from the Github Repo, and configure your backup schedule in /etc/sanoid/sanoid.conf. The config sets up how frequently snapshots run and how long they're preserved. For example, by default, hourly snapshots are only kept for 48 hours.
Once configured, just schedule a cronjob with root to sync the backup to your backup server (e.g., TrueNAS/FreeNAS).
switch to root sudo su
then run crontab -e
and add the following line.
5 * * * * /usr/sbin/syncoid --no-sync-snap --recursive --no-privilege-elevation --sshkey=~/.ssh/key-nas --exclude=swap rpool username@192.168.1.9:nas/LiveBackups/proxmox/rpool
By syncing rpool recursively we back up the Proxmox installation as well as all VM's / containers stored on that pool. For a multiple node set up you'd need to find a way to back up multiple pools from multiple machines. There might be a way from Proxmox snapshots but I'm not sure the best way!