Run script after garbage collection

mondorondo

Member
Jan 11, 2022
2
0
6
45
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.