Kopia can run custom commands after a snapshot completes. This allows you to ping a webhook (for example, Healthchecks) to confirm that a backup finished successfully. The important thing to remember here is to enable snapshot actions.
Enable Snapshot Actions
Snapshot actions are disabled by default.
-
Edit
repository.config -
Set:
"enableActions": true -
Fully restart Kopia:
docker compose down docker compose up -d
A full shutdown is required for this setting to take effect.
Configure the After-Snapshot Action
-
Open the Kopia web UI
-
Go to your snapshot policy
-
Open Snapshot Actions
-
Under After Snapshot, add:
curl -fsS --retry 3 https://<your-webhook-url> -
Save the policy
Test
Run Snapshot Now. Once the backup completes, Kopia will execute the command and ping your webhook.
That’s all that’s required to notify an external service after a successful Kopia backup.