Difference backing up LXCs and VMs

proxwolfe

Well-Known Member
Jun 20, 2020
501
52
48
49
Hi,

I am still experimenting with my cluster and keep oscillating between containers and VMs. And maybe it is a case of horses for courses.

For my Nextcloud installation with hundreds of GBs of disk space it seems that a VM is the better choice because having frequent (like hourly) backups is very important to me and dirty bitmaps (which speed up backups substantially) only work for VMs and not for containers. So for every backup run a full backup is needed which takes hours...

Just trying to get a confirmation or different perspective. Anyone running Nextcloud (or similar) with large disks in an LXC? How fast is backing up for you?

Thanks
 
Benefit of LXCs would be that you could restore single files without needing to restore the full big LXC first.
VM got the benefit of dirty bitmapping, so should be faster in case your data won't change that much.
PVE will only send data to the PBS that doesn't already exists. So sending data is like a regular differential backup, even if all backups are full backups. But the difference is on the PVE side, where all files of a LXC would have to be read and hashed each time. While a VM can track which blocks have been changed (but only if you don't reboot/shutdown that VM/node) and then only needs to read and hash the changed blocks.

For backing up hundred GBs of data hourly I would also use a VM.
 
Last edited:
I'm not an expert by any means because I am always learning something new especially with proxmox.

What I managed to achieve is a zfs storage pool on my proxmox host that is served to my LAN via a container that runs nfs, tftp, smb (primarily) and other services.

All other vm/containers have access to this storage pool via their respective protocols and they save all raw/important data there. Then I simply backup the data from the storage pool and I don't worry about the vm/containers as much. I backup the data more frequently than I backup the vm/containers because the vm/containers don't need to change as much in regard to their underlying system.

As far as vm/containers, I have scripts that set them up the same way as a baseline (add user, install packages, updates, settings etc.) so I don't even fret if I don't backup the vm/container. The data is my main concern.
 
Benefit of LXCs would be that you could restore single files without needing to restore the full big LXC first.
VM got the benefit of dirty bitmapping, so should be faster in case your data won't change that much.
PVE will only send data to the PBS that doesn't already exists. So sending data is like a regular differential backup, even if all backups are full backups. But the difference is on the PVE side, where all files of a LXC would have to be read and hashed each time. While a VM can track which blocks have been changed (but only if you don't reboot/shutdown that VM/node) and then only needs to read and hash the changed blocks.

For backing up hundred GBs of data hourly I would also use a VM.
Thanks for confirming. That gives me a good feeling about my plan.
 
Thanks for confirming. That gives me a good feeling about my plan.
I'm not an expert by any means because I am always learning something new especially with proxmox.

What I managed to achieve is a zfs storage pool on my proxmox host that is served to my LAN via a container that runs nfs, tftp, smb (primarily) and other services.

All other vm/containers have access to this storage pool via their respective protocols and they save all raw/important data there. Then I simply backup the data from the storage pool and I don't worry about the vm/containers as much. I backup the data more frequently than I backup the vm/containers because the vm/containers don't need to change as much in regard to their underlying system.

As far as vm/containers, I have scripts that set them up the same way as a baseline (add user, install packages, updates, settings etc.) so I don't even fret if I don't backup the vm/container. The data is my main concern.
Interesting approach and definitely a good solution. I basically do that with my PC. I never backup the system itself. And my important data sits on a network drive (from where it is backed up regularly). So I don't worry about my system.

I think (for the moment) I prefer to ease of use of PVE backups in connection with PBS. (But I am experimenting with Ansible to automate the setup of my VMs/LXCs and once I get the hang of that I might follow your footsteps and only backup the data).
 

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!