# Actions Question

**URL:** <https://kopia.discourse.group/t/actions-question/3727>\
**Category:** General Topics\
**Created:** [February 5, 2025, 5:35pm UTC](https://kopia.discourse.group/t/actions-question/3727 "2025-02-05T17:35:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ajweber/32/1382_2.png) [@AJWeber](https://kopia.discourse.group/u/AJWeber)\
**Post date:** [February 5, 2025, 5:35pm UTC](https://kopia.discourse.group/t/actions-question/3727/1 "2025-02-05T17:35:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [February 5, 2025, 6:29pm UTC](https://kopia.discourse.group/t/actions-question/3727/2 "2025-02-05T18:29:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AJWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ajweber/32/1382_2.png) [@AJWeber](https://kopia.discourse.group/u/AJWeber)\
**Post date:** [February 5, 2025, 7:23pm UTC](https://kopia.discourse.group/t/actions-question/3727/3 "2025-02-05T19:23:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [February 5, 2025, 7:28pm UTC](https://kopia.discourse.group/t/actions-question/3727/4 "2025-02-05T19:28:20Z")

</div>

As I said the easiest is to use UI:

 ![image](https://global.discourse-cdn.com/free1/uploads/kopia/original/2X/d/dc64e3e665e7dfeae2ca834c5207bb9567e24979.jpeg)

---

<div class="post-metadata">

**Author:** ![AJWeber](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/ajweber/32/1382_2.png) [@AJWeber](https://kopia.discourse.group/u/AJWeber)\
**Post date:** [February 5, 2025, 7:34pm UTC](https://kopia.discourse.group/t/actions-question/3727/5 "2025-02-05T19:34:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/kapitainsky/32/535_2.png) [@kapitainsky](https://kopia.discourse.group/u/kapitainsky)\
**Post date:** [February 5, 2025, 7:38pm UTC](https://kopia.discourse.group/t/actions-question/3727/6 "2025-02-05T19:38:06Z")

</div>

You can access UI via https by running kopia-server temporarily - here you are [how to](https://github.com/kopia/kopia/issues/3095)

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

---

<div class="post-metadata">

**Author:** ![dimejo](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/dimejo/32/287_2.png) [@dimejo](https://kopia.discourse.group/u/dimejo)\
**Post date:** [February 6, 2025, 8:38am UTC](https://kopia.discourse.group/t/actions-question/3727/7 "2025-02-06T08:38:19Z")

</div>

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

This is a screenshot of what I set in KopiaUI:

 ![kopia-ui](https://global.discourse-cdn.com/free1/uploads/kopia/original/2X/2/2ee2a4708c64ec1a369a704aace81f4be50f26c2.png)

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

 ![kopia-policy-edit](https://global.discourse-cdn.com/free1/uploads/kopia/original/2X/b/b6870aa769dda643a574b57d5a8bd24b164da051.png)
