Cannot use actions with Kopia Server?

Hi, I’m trying to use Kopia actions to trigger a curl request to Healthchecks.io, but I’m also using Kopia in server mode, and the actions don’t appear to work. The Kopia server is run with --enable-actions, but when I specify an after snapshot action like /usr/local/bin/curl https://hc-ping.com/5cf0c25e-8b37-4ff9-9dd6-b81aafa822ce (randomly generated UUID) in the web UI, I never get any pingback after a successful snapshot. Are actions not supported in server mode, despite the --enable-actions flag existing? There is no mention of actions in the snapshot logs, so as far as I can tell the command isn’t being run or even acknowledged, despite the snapshots all succeeding. Kopia is running on FreeBSD, if that makes any difference.

Try using the cli, the webui doesn’t allow for a command with parameters.

I’m not sure I understand, are you saying that actions defined in the WebUI cannot have arguments? If so, I did try creating a script file and chmodding it and referencing only that without any arguments, but it still never runs. If you mean that the command to start the server doesn’t accept any options like --enable-actions, according to server start | Kopia they should, which is the command I’m using to start the server.

The UI only exposes the binary to run which is different from the cli. When you specify the action with the cli, it saves the command along with the parameters sent with the command. After setting it in the cli, you can look at the UI and it only shows the command.

It might work if you put your curl in a bash script with executable permissions then pass that instead. But I would try the cli.

Thanks, I tried the CLI and it did exactly as you described when I supply it with a direct cURL command, but unfortunately the command still isn’t running, regardless of whether I put it in the snapshot or folder action. I now do get a message in the log, at least:

Not executing before-folder action on /mnt/media because it's been disabled for this client.

Review the docs here - Actions | Kopia, specifically how to enable them.

Thank you! I had missed that you have to modify the repository config as well, I only had the --enable-actions flag on the CLI, not enableActions in the config file. It works now!

Reviving this conversation as I am hitting the same error.

My repository server (running in docker) has "enableActions": true set in its repo config file.

I have connected to this repository server from KopiaUI running on a windows client.

From what I understand from Actions | Kopia, This is the only configuration I need to enable actions for the windows client, but I am still seeing the error Not executing after-snapshot-root action on C:\Users\Chris because it's been disabled for this client

Is it possible to use actions in this scenario where a KopiaUI connects to a remote repository server?