Backup taken on a last day of a month as monthly backup

robertlukan

Member
Feb 26, 2025
36
24
8
Hi everyone,

this is really not a problem, but more a "cosmetic" issue. I have the following retention policy, 1 monthly,4 weeklies, 7 dailies and 1 last. It is working fine.

But, I would like to make sure that monthly is actually the last day of the month, not just one of the weeklies.

Has anyone having an idea how to do it ? Gemini suggested me to run a script (daily) to protect backups taken on the last day of the month. Is there a better way ?

I know, I am being picky :)
 
I've already discussed about it here [1]. When I really have the need to keep the last backup of the last day of the month, I use this on PBS:
  • Create a namespace "MONTHLY"
  • Create a daily sync job that runs "if day is 28 to 31 of each month at 15:00": *-28..31 15:00. That will store a few of the last backups of each month
  • Create a prune policy on namespace "MONTHLY" with "keep-monthly"=12. This will keep 12 of those last snapshot of the month.
If I ever need to restore one of those MONTHLY copies, I just connect PVE to that namespace with a user with datastore.reader privilege.
If you don't use PBS (you should! ;) ), a similar strategy could be used i.e. rsyncing to some other directory.

[1] https://forum.proxmox.com/threads/pbs-prune-is-removing-backups-that-should-be-kept.166145/