Max Backups in LVM Storage

hal9008

Member
Sep 23, 2020
8
0
6
46
Hello.

I see that if I have a directory storage, In options of the storage i can set the maximum number of backups. But in LVM storage i can't manage this setting (doesn't exist the verification box). I suppose that it must be configured in terminal or maybe exists a workaround to set this option. ¿Anybody knows how to set the max number of backups in a LVM storage? I don't want to delete the storage to change the format and set it in the new format (I know that it is a solution, but i suposse that there must be a more elegant solution)

I want two backups of all my machines. Now I have 2 backups, but i think that the third will excede the size of the backups storage, so i want that the new backup delete the fist one. ¿adding '--remove 1' in /etc/pve/vzdump.cron may be the solution?
 
Last edited:
I see that if I have a directory storage, In options of the storage i can set the maximum number of backups. But in LVM storage i can't manage this setting (doesn't exist the verification box).

You cannot store any backup on LVM, so there is no max backup setting.
 
I think I have not explained myself well (translation problems. I am Spanish). I'm not storing backups in a LVM storage. I'll explain what I have.

I have been able to make two backups to my storage. This is the distribution of all my VM's

- VM 1: stored in LVM
- VM 2: stored in a Directory
- VM 3: stored in a Directory.
- Storage for backups: in a Directory

I have created a task to make backup copies from the graphical interface. two copies have been made automatically (for all VM's) and everything is correct so far.

For VM 2 and 3, in datacenter - storage, I assigned "Max Backups" to 2. But VM 1 is in a different storage. As it is in an LVM I do not see the option of Max Backups. But I can do backups of that machine (because I already have two). Can I set the "Max Backups" option for that storage through the terminal?
 
- VM 1: stored in LVM
- VM 2: stored in a Directory
- VM 3: stored in a Directory.
- Storage for backups: in a Directory
If you set "Max Backup" for the "Storage for backups" to for example 4 and use it as the backup location for VM1, VM2 and VM3 each of the 3 VMs will create up to 4 backups. You only set the number of max backups for the Backup location and not for the VMs itself.
 
I suspect that the directory you have your VM's in also has type "backup" enabled on it.
Yes, but as far as I know a LVM or ZFS can't be of type vzdump (backup) so there is logically no "max backups" option. Thats why I thought he thinks that the "max backups" defines the numer of maximum backups for a VM and not the maximum number of backups for the vzdump backup location.
 
Ah, Ok. It's as @BobhWasatch says. I thinked that all machines had different settings about backups (to set one machine to make only one copy and other to set six, for example). So, as all of you sais, if i set "Max backups" in the backup directory to 2, I will have 2 backups of all the machines and only 2 backups (the third will erase the first). OK. This will work for me. Thanks.

But.. ¿If anybody wants to make diffents number of copys of the machines? With this solution I think that it's impossible ¿Isn't it?
 
But.. ¿If anybody wants to make diffents number of copys of the machines? With this solution I think that it's impossible ¿Isn't it?
If you want different numbers of max backups you need to create different backup locations.
 

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!