Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before/after-snapshot-root action isn't reflected in server UI after being set via CLI #3851

Open
ruslan-mogilevskiy opened this issue May 7, 2024 · 2 comments

Comments

@ruslan-mogilevskiy
Copy link

ruslan-mogilevskiy commented May 7, 2024

Kopia 0.17 that's installed in server mode on Ubuntu 23.04.

I'm trying to configure the Kopia via Ansible and Kopia cli and struggling with the 'policy set':
kopia policy set "user@host:/some/path" --before-snapshot-root-action "/path/to/script.sh script-param1 script-param2"

After running the above command and looking at the Kopia UI policy page for the 'user@host:/some/path' the 'Before Snapshot' field (both defined and effective) remains empty no matter what I've tried although the 'kopia policy show ' shows that the before action is correctly set:

Run command before snapshot root:           (defined for this target)
  Command:
    /path/to/script.sh script-param1 script-param2
  Mode:                         essential
  Timeout:                           1m0s

On the other hand, if I set the same script but on the Server UI manually it is set correctly and visible in the UI and the snapshot runs successfully. But the kopia policy show shows it as an embedded script (not as Command as shown above) :

Run command before snapshot root:           (defined for this target)
  Embedded script (stored in repository):                            <<<<<<<<---------
    /path/to/script.sh script-param1 script-param2
  Mode:                         essential
  Timeout:                           1m0s

IMO it's a bug.

@ruslan-mogilevskiy
Copy link
Author

ADDED: when the before/after action command is set via API as described above these commands are removed when the policy is opened in the Server UI and the Save button is clicked.

@ruslan-mogilevskiy
Copy link
Author

@jkowalski , can you please confirm whether it is a bug or am I running smth incorrectly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant