zfs.resource.snapshot.create

Create a ZFS snapshot.

Args: data: Create parameters containing: - dataset: Dataset path to snapshot (e.g., ‘pool/dataset’). - name: Snapshot name (the part after @). - recursive: Create snapshots recursively for child datasets. - exclude: Datasets to exclude when creating recursive snapshots. - user_properties: User properties to set on the snapshot.

Returns: Snapshot entry for the created snapshot.

Raises: ValidationError: If dataset not found or snapshot already exists.

Examples: # Create a single snapshot create({“dataset”: “tank/data”, “name”: “backup”})

# Create recursive snapshots create({ “dataset”: “tank”, “name”: “backup”, “recursive”: True })

# Create with user properties create({ “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