Hello,
I would like to create a ZFS snapshot of a dataset programmatically, from a script.
To be more precise, I’m writing a script that safely stops services (on a different machine; they store data on the TrueNAS using a NFS share), creates a (ZFS) snapshots of the data, updates the services and starts them back up. In case anything goes wrong, I need to be able to restore to the last version of the service and its data.
The script is running on a different machine than TrueNAS. Preferably, it would connect to TrueNAS using SSH to create the snapshot.
You accidentally linked to the deprecated REST API. The new API has docs at api.truenas.com and the client for that is pre-installed on TrueNAS Scale and can be used from SSH
Now I need to figure out how to create a snapshot…