TrueNAS Scale + duplicacy CLI

I am running TrueNAS Scale and need to backup the nas via duplicacy CLI.
I can use root with ssh but I am not sure if this is the correct approach here.
TrueNAS normally uses its App Database to install Apps.
How can I use duplicacy cli with TrueNAS and backup all my files?

It’s pretty straightforward.

  1. Create a dataset to hold duplicacy executable, configuration, and the temporary repository.
  2. You would need to write pre-backup and post-backup scripts, where you would take and mount, and then unmount and destroy zfs snapshots of the datasets you need to backup (and export dumps of any databases that you might be running). Alternatively you can rely on the scheduler to take (auto-expiring) snapshots for you automatically and in pre-backup script mount them or symlink the last one from .zfs directory into target repository.
  3. Use the same scheduler to execute duplicacy backup.
  4. You can run it as root or you can manage permissions and/or ACLs if you prefer otherwise.