Backup behaviour of LXC containers on PVE

AraToken

Member
Jul 8, 2021
40
5
13
28
Hi everyone!

I am currently trying to understand the backup process on PVE hosts a bit more because i noticed a small issue lately that i am trying to resolve on my host.
Basically i noticed my backup jobs for my LXC containers stopped working a while ago because it apparently runs out of space on /dev/mapper/pve-root. Which is good to know but still does not make much sense to me because i barely did anything on the host for a while that would result in the disk space to run out. I know that the disk i installed the system is rather small and i plan on replacing it with a larger one soon but it still bothers me a bit.

Please correct me if i misunderstood anything but as far as i see it: when you start a backup job for a LXC, it writes the content of the container (or parts of it) to the tmp-directory before pushing the backup to the PBS?
Does that mean in conclusion: if i use a container with let's say 500GB disk i need to keep at least that amount on my pve-root free in order for the tmp-files to write correctly? Does that behaviour change by any chance depending on what backup sotrage you use? (PBS, local disk, ...)

I know that it is more common to use VMs instead of containers for larger instances, i'm just trying to understand the process behind the backups.

Thank you in advance for any responses!
 
I know that it is more common to use VMs instead of containers for larger instances, i'm just trying to understand the process behind the backups.
LXCs can't use dirty-bitmapping so that the backup will take much longer. Let's say you got a 500GB LXC and a 500GB VM and since your last backup only 100MB of those virtual disks changed. A snapshot-mode backup of the VM would only need to read and write the dirty 100MB and the backup would be finished very quickly, as the 499,9GB could to completely ignored.
The backup of the LXC would need a very long time as the whole 500GB need to be read and hashed every time, even if only the changed 100MB will be written to the PBS.

Does that behaviour change by any chance depending on what backup sotrage you use? (PBS, local disk, ...)
Not sure how it is with PBS, but when using VZDump and not changing the "tmpdir" in vzdump.conf, then the tmpdir will default to a subfolder in your VZDump storge. So when using a NAS or big dedicated internal/external disk for backups, it would also write those temporary files to these instead of your small root filesystem.
 
Last edited:
  • Like
Reactions: AraToken

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!