Backing up proxmox (the host itself) - what and how?

While it look simple to run in a script.. it look there is not a full
backup ? As yes, /root/ is not important, the /sbin and /usr/local/, might be best to add.. If we install any package, some config end up to the /var, so having just the: /var/lib/pve-cluster/* might cause missing file ?

This look easier use than the proxmox backup software, but if direct install the .iso and no update done. If i do understand correct...
 
Found one single thread so far dealing with this question but no definitive answer so I'm opening my own. http://forum.proxmox.com/threads/21...de-quot-system-quot-partitions-(boot-and-lvm)

If I've somehow missed this information, feel free to point me towards it. I'll also happily edit the wiki if I get useful replies here.

My intention is not to talk about backup storage and target or the tool used for the backup as that depends on everyone's preferences.

My goal is:

If the worst case scenario happens and I need to completely restore a proxmox server, I want to be able to do a Bare-metal ISO install and then restore a backup, maybe change the hostname and networking configuration and have proxmox in exactly the state it was during the last backup without any VMs or containers of course.

What to backup?
Since proxmox doesn't run any DBs (right?) I thought I#d use a tool like duplicity or borgbackup or attic or whatever and backup /
Now I'm considering what to exclude from the backup. This is my list so far, any suggestions what to exclude or include?

EXCLUDE LIST
*/cache
*/cache/supercache
*/image_cache
*/lost+found
*/Maildir/.spam
*/Maildir/.Trash
*/rrd
*/tmp
*/web/serverstats
/cdrom
/dev
/initrd
/media
/mnt
/opt
/proc
/run
/srv
/sys
/usr/share/man
/var/backups
/var/cache
/var/empty
/var/lib/mysql
/var/lock
/var/log
/var/run
/var/spool
/var/webmin
/var/lib/lxc/*/rootfs/media/*
/var/lib/lxc/*/rootfs/mnt/*
/var/lib/lxc/*/rootfs/proc/*
/var/lib/lxc/*/rootfs/run/*
/var/lib/lxc/*/rootfs/sys/*
/var/lib/lxcfs/cgroup
/var/lib/vz


I'm not sure if I am excluding too much or too little, any hints are welcome please.

I found another thread: https://pve.proxmox.com/wiki/Backup_and_restore_of_LVM_data saying to use: vgcfgbackup - would that still be needed with my proposed solution above?
This has been very helpful for me. I did a slim down version of yours and here is my .pxarexlude (placed at the / directory)

Code:
/var/cache/*
/var/log/*
/var/run/*
/var/lib/lxc/*
/var/lib/lxcfs/*
/var/lib/vz/*

However, my only question is why does it skip /etc/pve? I thought it would be good to have it backed up since it contains all the important data for the cluster and node information.
 
I mean it's a feature not a bug. I know how and what to do but obfuscating/discouraging this is pretty discouraging choice for new users.
I was just getting at the fact that lots of e.g. feature requests come and go on this forum, by search one can see, since years, but not a single bugzilla entry. Bugzilla allows to file feature requests, also on the docs component of PVE.

If it was ever filed, there would have been an official answer and whoever finds it later can then go join the issue # there, once enough people gather there, it might even get some priority.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!