diff --git a/app/client/api-client/types.gen.ts b/app/client/api-client/types.gen.ts index ddf355f3..d63fc595 100644 --- a/app/client/api-client/types.gen.ts +++ b/app/client/api-client/types.gen.ts @@ -2434,6 +2434,16 @@ export type ListBackupSchedulesResponses = { includePatterns: Array | null; oneFileSystem: boolean; customResticParams: Array | null; + preBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; + postBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; maxRetries: number; retryDelay: number; lastBackupAt: number | null; @@ -2712,6 +2722,16 @@ export type CreateBackupScheduleData = { oneFileSystem?: boolean; tags?: Array; customResticParams?: Array; + preBackupWebhook?: { + url: string; + headers?: Record; + body?: string; + } | null; + postBackupWebhook?: { + url: string; + headers?: Record; + body?: string; + } | null; maxRetries?: number; retryDelay?: number; }; @@ -2747,6 +2767,16 @@ export type CreateBackupScheduleResponses = { includePatterns: Array | null; oneFileSystem: boolean; customResticParams: Array | null; + preBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; + postBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; maxRetries: number; retryDelay: number; lastBackupAt: number | null; @@ -2816,6 +2846,16 @@ export type GetBackupScheduleResponses = { includePatterns: Array | null; oneFileSystem: boolean; customResticParams: Array | null; + preBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; + postBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; maxRetries: number; retryDelay: number; lastBackupAt: number | null; @@ -3093,6 +3133,16 @@ export type UpdateBackupScheduleData = { oneFileSystem?: boolean; tags?: Array; customResticParams?: Array; + preBackupWebhook?: { + url: string; + headers?: Record; + body?: string; + } | null; + postBackupWebhook?: { + url: string; + headers?: Record; + body?: string; + } | null; maxRetries?: number; retryDelay?: number; }; @@ -3130,6 +3180,16 @@ export type UpdateBackupScheduleResponses = { includePatterns: Array | null; oneFileSystem: boolean; customResticParams: Array | null; + preBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; + postBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; maxRetries: number; retryDelay: number; lastBackupAt: number | null; @@ -3179,6 +3239,16 @@ export type GetBackupScheduleForVolumeResponses = { includePatterns: Array | null; oneFileSystem: boolean; customResticParams: Array | null; + preBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; + postBackupWebhook: { + url: string; + headers?: Record; + body?: string; + } | null; maxRetries: number; retryDelay: number; lastBackupAt: number | null; diff --git a/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx b/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx index a6d865a3..aa5aae3f 100644 --- a/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx +++ b/app/client/modules/backups/components/create-schedule-form/advanced-section.tsx @@ -56,6 +56,102 @@ export const AdvancedSection = ({ form }: AdvancedSectionProps) => { )} /> + ( + + Pre-backup webhook + + + + + Called with POST before restic starts. A non-2xx response stops the backup. + + + + )} + /> + ( + + Pre-backup webhook headers + +