Source Events ↗

cloudpanel.database.export_failed

A database export failed or was cancelled.

When
After hooks cancel the export or clpctl exits with an error.
Payload
JSON: { operation, command, args, siteType?, status?, duration_ms, error?, hook_handlers }.
Cancelable
No

The error field contains the cancellation reason or sanitized CLI error.

Use cases

  • Export failure alerts

Example

Registration and handler

Register

hook!(host, PluginEvent::CloudPanelDatabaseExportFailed, on_database_export_failed);

Handler

extern "C" fn on_event(ctx: *const EventContext) -> HookResult {
    let ctx = unsafe { &*ctx };
    let payload = unsafe { std::slice::from_raw_parts(ctx.payload_ptr, ctx.payload_len) };
    let _json = std::str::from_utf8(payload).unwrap_or_default();
    HookResult::r#continue()
}

← All lifecycle events