backup limit per vm

blackmetal

Member
Jan 17, 2017
11
0
6
40
Hello,
i add a schedule backup task to my proxmox but i have set that only keep X backup per vm and only overwrite them how can i do this?
because i set daily backup and after 4-5 month if i forgot remove old backup my backup disk will be full.
thanks,
 
See maxfiles setting in /etc/vzdump.conf
http://pve.proxmox.com/pve-docs/vzdump.1.html

If you need something more complex use hook scripts.
Some of my vms are so large I need to delete the old backup before making a new one.
My script uses backup start hook, checks the vmid and if matched deletes the old backup files.

Example hook script here:
https://github.com/proxmox/pve-manager/blob/master/vzdump-hook-script.pl

Maybe you could make a hook script that deletes old backups based on disk space usage. The possibilities are endless.
 
Hello,
1. if i set maxfile in vzdump settings then it will only keep 10 backups of my all vms and then overwrite them every day right?it does not show error to me that my maxfile limit exceed?
2. also i think there is another way that add a cronjob to linux that run my find command then in find command define remove files that are old for more than x days in backup path right?
thanks,
 

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!