zfs.resource.snapshot.create

Create a ZFS snapshot.

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 dataset does not exist

  • the snapshot already exists

Examples:

Create a single snapshot:

{"dataset": "tank/data", "name": "backup"}

Create snapshots recursively:

{"dataset": "tank", "name": "backup", "recursive": true}

Create with user properties:

{"dataset": "tank/data", "name": "backup", "user_properties": {"com.company:backup_type": "daily"}}
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: data

data

Type: object

Create parameters for creating ZFS snapshots.

No Additional Properties

Dataset

Type: string

Dataset path to snapshot (e.g., 'pool/dataset').

Must be at least 1 characters long

Name

Type: string

Snapshot name (the part after @).

Must be at least 1 characters long

Recursive

Type: boolean Default: false

Create snapshots recursively for child datasets.

Exclude

Type: array of string Default: []

Datasets to exclude when creating recursive snapshots.

No Additional Items
Each item of this array must be:
Type: string

User Properties

Type: object Default: {}

User properties to set on the snapshot. Only user-defined properties are supported (e.g., 'com.company:backup_type'). Regular ZFS properties cannot be set on snapshots at creation time.

Each additional property must conform to the following schema

Type: string

ZFSResourceSnapshotEntry

Type: object
No Additional Properties

Createtxg

Type: integer

The TXG in which the snapshot was created.

Guid

Type: integer

A GUID for the snapshot.

Name

Type: string

The zfs resource for the given snapshot.

Pool

Type: string

The zpool of the snapshot.

Dataset

Type: string

The zfs resource for the given snapshot.

Snapshot Name

Type: string

The name of the snapshot.

Type

Type: const Default: "SNAPSHOT"

The type of zfs resource.

Specific value: "SNAPSHOT"

Holds


A list of tags that hold the snapshot.

Type: array
No Additional Items
Each item of this array must be:
Type: object
Type: null


Requested properties for the snapshot.

Type: object
Type: null

User Properties


User-defined properties for snapshots.

Type: object

Each additional property must conform to the following schema

Type: string
Type: null


Required roles: SNAPSHOT_WRITE