Proxmox Backup Server Prune and GC Question

vsurresh

New Member
Jan 29, 2025
3
0
1
Hi all. Let me start by saying I'm net to Proxmox and thanks in advance.

I take daily backups at 2 AM and want to keep the last 6 backups, 2 monthly, and 2 yearly. I’ve gone through the documentation, but I’m still confused about the 24-hour + 5-minute rule for garbage collection.

I understand that prune removes snapshots, but chunks remain on disk until garbage collection runs. However, I’m not sure how to correctly schedule prune and GC so that unused chunks are deleted properly without interfering with `atime`.

What would be the best schedule for my prune and garbage collection jobs, considering my backup runs at 2 AM daily?

I found out about `atime` from here - https://forum.proxmox.com/threads/garbage-collection.139547/

Thanks!
 
Hi,
I understand that prune removes snapshots, but chunks remain on disk until garbage collection runs. However, I’m not sure how to correctly schedule prune and GC so that unused chunks are deleted properly without interfering with `atime`.
this depends on how fast you want to cleanup eventually unused chunks. The more frequent you run garbage collection, the more often you clean up these chunks. But garbage collection is rather expensive, as all index files have to be read and all still used chunks touched, so you probably want this to be run maybe when there is not much other load. e.g. weekly.

But this depends strongly on the use-case.

Also, you do not have to worry about the atime updates by garbage collection yourself, this is all consistently performed by the code.
 
Hi,

this depends on how fast you want to cleanup eventually unused chunks. The more frequent you run garbage collection, the more often you clean up these chunks. But garbage collection is rather expensive, as all index files have to be read and all still used chunks touched, so you probably want this to be run maybe when there is not much other load. e.g. weekly.

But this depends strongly on the use-case.

Also, you do not have to worry about the atime updates by garbage collection yourself, this is all consistently performed by the code.
Thank you for the response. Just to confirm, even if I set pruning to daily at 5 AM and GC to daily at 7 AM, would that be okay? I don't use the server a lot in the morning so, load shouldn't be an issue.
 
even if I set pruning to daily at 5 AM and GC to daily at 7 AM, would that be okay?
You need 24 hours and 5 minutes between both calls.

While I make backups every night I run GC only once a week, that's frequent enough for me :-)
 
You need 24 hours and 5 minutes between both calls.

While I make backups every night I run GC only once a week, that's frequent enough for me :-)
What about your prune schedule? Do you mind give me the ballpark timings on when do you take backup, prune and GC? TIA
 
What about your prune schedule? Do you mind give me the ballpark timings on when do you take backup, prune and GC?

Do you have a specific problem?

Just run backup as frequent as required. Usually daily (during the night) is fine. Under some conditions a higher frequency like "backup hourly" may be useful - for example if you don't have a chance to create hourly snapshots but need a way to rollback in smaller steps than just "last night".

Run prune daily.

Run GC as often as useful. For me once during the weekend is fine. Remember that GC is technically more expensive than pruning.


Disclaimer: this is just an example - ymmv!