pve multiple backup plans and retention

CanadaGuy

Well-Known Member
Nov 19, 2019
53
6
48
42
I'm having trouble with maintaining two backup routines. My original goal was to have two plans: one backs up all VMs/containers nightly using "snapshot" mode so that any users are not directly impacted on a daily basis. I also wanted to run a plan weekly using "stop" mode so that I know I have at least one backup with guaranteed state/storage consistency.

I have the snapshot mode retention set to 3, and stop mode retention set to 1.
1669821930947.png
However, it seems that the retention-3 plan discards the retention-1 plan after 3 days. Is there no way to differentiate between backup mode retention?

Note: I run a nightly online backup of any changed backup files, so I DO in fact have the stop mode backups saved elsewhere but I really would like to keep it on the PVE server if at all possible.

Thanks for any advice and comments.
 
If you have the QEMU Guest Agent installed, it has the same guarantees consistency as doing a `Stop` mode backup.
 
  • Like
Reactions: CanadaGuy
If you have the QEMU Guest Agent installed, it has the same guarantees consistency as doing a `Stop` mode backup.
oh really? See any documentation I could refer to on this? not doubting, I just want to understand any conditions of it. For my VMs, yes I do have QEMU Guest Agent.

What about LXC containers? I'm pretty new to containers, but I guess they already exist in a consistent state on the host machine, and don't really have an independent state?
 
For CTs we already call `fsfreeze` for both the rootfs and all mountpoints. This makes sure that the filesystem is in a consistent state.
The guest agent does the same for VMs where we don't have direct access to the filesystem. On linux it calls `fsfreeze` as well and on Windows the VSS is used.
 
For CTs we already call `fsfreeze` for both the rootfs and all mountpoints. This makes sure that the filesystem is in a consistent state.
The guest agent does the same for VMs where we don't have direct access to the filesystem. On linux it calls `fsfreeze` as well and on Windows the VSS is used.
sorry, it's not fully clear to me. You're referring to the PVE "Backup" function for CTs? or you mean if we did a backup of the PVE host itself?
 
I'm having trouble with maintaining two backup routines. My original goal was to have two plans: one backs up all VMs/containers nightly using "snapshot" mode so that any users are not directly impacted on a daily basis. I also wanted to run a plan weekly using "stop" mode so that I know I have at least one backup with guaranteed state/storage consistency.
That is exactly what I am doing. I solved that with namespaces. One namespace for weekly stop backups and one namespace for daily snapshot backups. Each namespace can have its own retention and deduplication is datastore-wide, so you don't waste space.
Works perfectly fine. I also got a third namespace just for manual backups, so that they will never be auto pruned.
 
Last edited:
That is exactly what I am doing. I solved that with namespaces. One namespace for weekly stop backups and one namespace for daily snapshot backups. Each namespace can have its own retention and deduplication is datastore-wide, so you don't waste space.
oh, well, I'm not using Proxmox backup...this is all PVE and then I use scp to create online backups...
 
Ah ok. then you really should have a look at PBS. You probalby don't know how much space and time your are wasting not using it. So much faster backups. so much saved bandwidth and just a fraction of consumed space with deduplication and incremental backups.
 
Last edited:
However, it seems that the retention-3 plan discards the retention-1 plan after 3 days. Is there no way to differentiate between backup mode retention?
Yeah, just ran into the same type of problem. Maybe I've missed it, but this potential issue isn't mentioned in the docs. I would love to see Proxmox VE issue a warning if a VM or container is included in more than 1 backup schedule.

Even better, Proxmox should include an identifier of the schedule that created a file in its name. This way, there wouldn't be conflicts in the first place.
 

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!