zfs.resource.snapshot.clone

Clone a ZFS snapshot to create a new dataset.

Invalid input is returned to the client as a JSON-RPC error response (code -32602, Invalid params); each failing condition appears in the error’s data.extra array with its own errno. A validation error is raised when:

  • the source snapshot does not exist

  • the destination dataset already exists

  • the source is not a snapshot

Examples:

Clone a snapshot to a new dataset:

{"snapshot": "tank/data@backup", "dataset": "tank/data_clone"}

Clone with properties:

{
    "snapshot": "tank/data@backup",
    "dataset": "tank/data_clone",
    "properties": {"compression": "lz4", "quota": "10G"}
}
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: data

data

Type: object

Clone parameters for cloning ZFS snapshots.

No Additional Properties

Snapshot

Type: string

Source snapshot path to clone (e.g., 'pool/dataset@snapshot').

Must be at least 1 characters long

Dataset

Type: string

Destination dataset path for the clone (e.g., 'pool/clone').

Must be at least 1 characters long

Properties

Type: object Default: {}

ZFS properties to set on the cloned dataset.

Each additional property must conform to the following schema


Type: string
Type: integer

Result

Type: null


Required roles: SNAPSHOT_WRITE