# Before Snapshot Action mode is set to 'must succeed' but snapshot proceeds afterwards

**URL:** https://kopia.discourse.group/t/before-snapshot-action-mode-is-set-to-must-succeed-but-snapshot-proceeds-afterwards/1576
**Category:** Support
**Created:** [November 26, 2022, 11:22am UTC](https://kopia.discourse.group/t/before-snapshot-action-mode-is-set-to-must-succeed-but-snapshot-proceeds-afterwards/1576 "2022-11-26T11:22:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/peter/32/441_2.png) [@peter](https://kopia.discourse.group/u/peter)
#### Post date: [November 26, 2022, 11:22am UTC](https://kopia.discourse.group/t/before-snapshot-action-mode-is-set-to-must-succeed-but-snapshot-proceeds-afterwards/1576/1 "2022-11-26T11:22:37Z")

</div>

I have a web space I like to backup with kopia to my local repo. I can connect to it via sftp/ssh.

Therefore I wrote a simple mount script containing basically: `sshfs $USER@$HOST:/ $MNT_DIR`

And defined this as a _before snapshot action_ with command mode “_must succeed_” (in UI, saved as ‘sync’ in policy. I didn’t find documentation about the policy details, but I assume that it’s the same).

Now two things happen:

1. When the web space is mounted already (e.g. I mounted it manually before), an error is reported, because the mount script fails - but then kopia _proceeds_ to take the snapshot.

```nohighlight
+ mkdir -pv /...
+ sshfs ...@...:/ /...
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
ERROR error running non-essential action command: exit status 1
| 3 hashing, ....

```

I wonder, why it outputs “_non-essential action command_”. I expect a “must succeed” to be essential and snapshot execution to be aborted.

Is this a bug?

1. Sometimes the mounting doesn’t work (didn’t figure out when exactly, maybe, it’s too slow, or unmounts again before the snapshots starts), and then **a snapshot is taken from the empty mount directory**. This doesn’t harm immediately, but I noticed that tags (annual, weekly, and so on), are set to the newly created but empty snapshot. So I fear, one day, when I don’t monitor if everything is working, kopia might throw away the snapshots that contain content, because it treats snapshots that are actually failed, but not recognized as failed, as valid snapshots. To be honest, I’ve no idea how this kind of error could be automatically detected, but I don’t feel well about it.

For now, I’ve pinned a last working snapshot.

1. In general: is there a better way to backup a web space? In fact, I also have ssh access to the web space with a kind of limited set of commands, so I might be able to run a script there to detect changes. I can’t install packages, but I also might be able to run a binary (debian).

I’m using kopia v0.12.1 on Linux Mint

---

<div class="post-metadata">

### Author: ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/peter/32/441_2.png) [@peter](https://kopia.discourse.group/u/peter)
#### Post date: [November 26, 2022, 11:26am UTC](https://kopia.discourse.group/t/before-snapshot-action-mode-is-set-to-must-succeed-but-snapshot-proceeds-afterwards/1576/2 "2022-11-26T11:26:30Z")

</div>

I just noticed that when I change the command mode in the UI to s.th. else and back to “must succeed”, the effective policy is shown as “essential”, while before it was blank. Now, “essential” also appears in the output of `policy show`. And now, it snapshot aborts as expected. So it seems to be a bug in the UI or with the initial state of this policy?

---

<div class="post-metadata">

### Author: ![rumor](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/rumor/32/1036_2.png) [@rumor](https://kopia.discourse.group/u/rumor)
#### Post date: [May 5, 2024, 2:18pm UTC](https://kopia.discourse.group/t/before-snapshot-action-mode-is-set-to-must-succeed-but-snapshot-proceeds-afterwards/1576/3 "2024-05-05T14:18:06Z")

</div>

This bug is still present in the latest version.

---

<div class="post-metadata">

### Author: ![cthulhu.den](https://yyz2.discourse-cdn.com/free1/user_avatar/kopia.discourse.group/cthulhu.den/32/1929_2.png) [@cthulhu.den](https://kopia.discourse.group/u/cthulhu.den)
#### Post date: [December 12, 2025, 10:41pm UTC](https://kopia.discourse.group/t/before-snapshot-action-mode-is-set-to-must-succeed-but-snapshot-proceeds-afterwards/1576/4 "2025-12-12T22:41:06Z")

</div>

Still present in the latest version ☹
