Actions Question

I’d like to use the ZFS Pool “snapshot” feature. I see the example scripts in the docs, and these look like all I really need.

My question is where should I assign them to run? I assume “before-snapshot-root-action”, but why is a path required here? Should it be the root path that I will be issuing a snapshot for each iteration of CLI?

Also, when you say that the actions are “inherited”, I assume that they are only run once at the start (and the after at the end) of the snapshot…not each time a directory is traversed, right?

It is not the best part of docs indeed and concept of inheritance is not very clear IMO. I simply keep all simple and configure actions at snapshots’ policy level.

It is much easier to use kopia UI to configure these actions.

What you need is before and after snapshot ones.

I use actions and filesystem snapshots all the time and all works perfectly.

Feel free to ask questions if you have some issues.

Yes, and I am happy to “persist” the scripts.

Can you please tell me how to assign the before/after scripts to the snapshot policy (and I assume that means they will only just before a snapshot starts, and after it completes – not per folder)?

TY

As I said the easiest is to use UI:

Ah, I do not have the UI downloaded and running. I am trying to use the CLI because I’m “installing” on an appliance and trying to stay as “skinny” as possible.

You can access UI via https by running kopia-server temporarily - here you are how to

I use cmd mostly too but for actions I could not be asked to try to decipher documentation gaps so I used UI:)

1 Like

The UI is using the --before-snapshot-root-action parameter internally.

This is a screenshot of what I set in KopiaUI:

That’s what is actually saved as a policy (output of kopia policy edit):

1 Like