Post backup script in version 11.38

egrueda

Member
Mar 29, 2011
21
0
51
Madrid, Spain
Hi all.

I want to execute my post backup script after backup is done with new backup system from 11.38
I cannot find a place to specify I want to run this script and I find nothing in the documentation.

Can someone help me? How are pre/post backup scripts used with new backup system?
Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Per the the following post:

Force Backup Run on 11.38

The new backup system uses the standard hook system we introduced in 11.32 (Getting Started). Through that, bin/backup exposes both a pre and a post hook event.
You need to switch to the Standard Hook system, as I mentioned earlier. The hook event you want is System::Backup. There is both a pre and post stage, which roughly approximates precpbackup and postcpbackup. The System::Backup event is in the process of being documented, it was overlooked.
Thank you.
 

egrueda

Member
Mar 29, 2011
21
0
51
Madrid, Spain
Hmm, I see. There's no backwards compatibility, so we are forced to fix our scripts if we want to use the new backup system :-/
All my 11.36 servers are already using a postcpbackup, and I like how it works, so I'm going back to legacy backup until I find some free and bored time.
Thanks again.