Run script after garbage collection

mondorondo

Member
Jan 11, 2022
2
0
6
44
Is there any kind of hook or method of triggering a script when garbage collection finishes? I have my datastore configured to do a prune, followed by GC, and then I want to trigger an rclone script to push a copy of the datastore to Backblaze B2, but I would greatly prefer this to be triggered by GC finishing instead of a cron schedule. I don't think PBS has anything like this built in, so consider this a feature request, but is there another way to accomplish this? I can probably come up with something, such as watching the task logs.
 
currently no built-in way, but you could do it the other way round: trigger the garbage collection (and your script afterwards) from a cronjob/systemd timer instead of the pbs itself

edit: you can trigger the gc with 'proxmox-backup-manager garbage-collection start <store>'
 
Thank you, that's an embarrassingly obvious solution in retrospect. Now to figure out if I can get this to show up in the task list / logs.
 

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!