clone

Undocumented in source. Be warned that the author may not have intended to support it.
@SILdoc(`Clone a ZFS filesystem or a ZFS volume ("zvol") from a given snapshot. Params: string name: a name of the dataset to be created. string origin: a name of the origin snapshot. string[string] properties: ZFS dataset property name-value pairs Errors: FilesystemExists: if a dataset with the given name already exists. DatasetNotFound: if either a parent dataset of the requested dataset or the origin snapshot does not exist. PropertyInvalid: if one or more of the specified properties is invalid or has an invalid type or value. FilesystemNameInvalid: if the name is not a valid dataset name. SnapshotNameInvalid: if the origin is not a valid snapshot name. NameTooLsource/symmetry/api/libzfs_core.d.tmp:6490:67: warning: missing terminating ' character NameTooLong: if the dataset name is too longor if the dataset's origin has a snapshot that, if transferred to the dataset, would get a too long name. ^ source/symmetry/api/libzfs_core.d.tmp:6493:98: warning: missing terminating ' character SnapshotExists: if the dataset already has a snapshot with the same name as one of the origin's snapshots. ^ source/symmetry/api/libzfs_core.d.tmp:6513:38: warning: missing terminating ' character FilesystemNotFound: if the target's parent does not exist. ^ ong: if the name or the origin name is too long. PoolsDiffer: if the clone and the origin have different pool names. Note: Because of a deficiency of the underlying C interface DatasetNotFound can mean that either a parent filesystem of the target or the origin snapshot does not exist. It is currently impossible to distinguish between the cases. lzc_hold can be used to check that the snapshot exists and ensure that it is not destroyed before cloning. `)
void
clone
(
string name
,
string origin
,
string[string] properties = (string[string]).init
)

Meta