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.

  1. Edit repository.config

  2. Set:

    "enableActions": true
    
  3. 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

  1. Open the Kopia web UI

  2. Go to your snapshot policy

  3. Open Snapshot Actions

  4. Under After Snapshot, add:

    curl -fsS --retry 3 https://<your-webhook-url>
    
  5. 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.