Backup Schedule Help - Last Day Of Month

briansbits

New Member
Feb 22, 2024
7
2
3
Hello,

I'm not sure if this post belongs in the Proxmox VE forum or in the Proxmox Backup Server forum, please forgive me if this is in the wrong place, but since backup jobs are configured and scheduled in Proxmox VE I'm posting here.

I have created several backup jobs to backup my VM's at certain intervals on certain days. I've got everything sorted out and working as I'd like except for getting a job configured to run on the last day of the month. I can't seem to figure out the syntax for the schedule on this one. Some months end on the 30th, some on the 31st, February ends on the 28th, and once every 4 years it ends on the 29th.

Systemd OnCalendar event syntax for this doesn't work. The OnCalendar syntax uses a tilde ~ between the month and day position to indicate the last day of the month. Eg: *-*~1 would be the last day of the month, where *-*~3 would be the third last day of the month. This was implemented on March 1, 2017. See here: https://github.com/systemd/systemd/blob/v233/NEWS#L174

Is a similar functionality available in the Proxmox scheduler? I have looked at the documentation, trial and error'ing, and searching the interwebs... and wasn't able to come up with anything.
 
Is this for work or homelab?

One way to solve this problem is to run the backup every day from the 28th-31st and only keep the last one. With PBS this should be fairly easy and space-efficient with dedup.

But typically you would call a wrapper script that checks date or cal and only proceeds if it determines the right conditions.

https://search.brave.com/search?q=p...summary=1&conversation=6cb9f4bb21428aef9ccd22

Is there any limitation on running this backup just after midnight on the 1st of the month instead? That would probably be easier. Sometimes you gotta think outside the box.
 

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!