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.

ZFSResourceSnapshotPropertiesEntry

Type: object
No Additional Properties

Type

Type: object

(READ-ONLY): Type of ZFS dataset (filesystem, volume, etc).

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

SourceValue

Type: object
No Additional Properties

Type

Type: enum (of string)

The source type.

Must be one of:
  • "NONE"
  • "DEFAULT"
  • "TEMPORARY"
  • "LOCAL"
  • "INHERITED"
  • "RECEIVED"

Value


The source value.

Type: string
Type: null
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Creation

Type: object

(READ-ONLY): Timestamp when dataset was created.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Used

Type: object

(READ-ONLY): Space used by dataset and descendants.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Referenced

Type: object

(READ-ONLY): Space referenced by this dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Compressratio

Type: object

(READ-ONLY): Property showing achieved compression ratio.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Createtxg

Type: object

(READ-ONLY): Transaction group when dataset was created.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Guid

Type: object

(READ-ONLY): Globally unique identifier for the dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Primarycache

Type: object

Controls primary cache usage (all, metadata, or none).

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Secondarycache

Type: object

Controls secondary cache usage (all, metadata, or none).

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Objsetid

Type: object

(READ-ONLY): Object set identifier for the dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Mlslabel

Type: object

Multi-level security label for the dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Refcompressratio

Type: object

(READ-ONLY): Compression ratio for referenced data.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Written

Type: object

(READ-ONLY): Space referenced since previous snapshot.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Logicalreferenced

Type: object

(READ-ONLY): Logical space referenced by dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Context

Type: object

SELinux security context for the dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Fscontext

Type: object

SELinux filesystem security context.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Defcontext

Type: object

SELinux default security context for new files.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Rootcontext

Type: object

SELinux root directory security context.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Encryption

Type: object

Controls encryption cipher suite for the dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Encryptionroot

Type: object

(READ-ONLY): Property showing encryption root dataset.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Keystatus

Type: object

(READ-ONLY): Encryption key status (available/unavailable).

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Redact Snaps

Type: object

(READ-ONLY): List of redaction snapshots.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Prefetch

Type: object

Controls prefetch behavior (all, metadata, or none).

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Devices

Type: object

Controls whether device files can be opened.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Exec

Type: object

Controls whether programs can be executed from filesystem.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Setuid

Type: object

Controls setuid/setgid bit respect on executable files.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Xattr

Type: object

Controls extended attribute behavior (on, off, sa, dir).

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Version

Type: object

(READ-ONLY): Filesystem version number.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Utf8Only

Type: object

Controls whether only UTF-8 filenames are allowed.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Normalization

Type: object

Unicode normalization property for filenames.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Casesensitivity

Type: object

Determines filename matching algorithm sensitivity.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Nbmand

Type: object

Controls non-blocking mandatory locking behavior.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Acltype

Type: object

Specifies type of ACL to use (off, nfsv4, posix).

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Defaultuserquota

Type: object

Default space quota for new users.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Defaultgroupquota

Type: object

Default space quota for new groups.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Defaultprojectquota

Type: object

Default space quota for new projects.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Defaultuserobjquota

Type: object

Default object quota for new users.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Defaultgroupobjquota

Type: object

Default object quota for new groups.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Defaultprojectobjquota

Type: object

Default object quota for new projects.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null

Volsize

Type: object

Logical size of the volume.

No Additional Properties

Raw

Type: string

The raw value of the property.


The source from where this property received its value.

Type: object
Type: null

Value


The parsed raw value of the property.

Type: integer
Type: number
Type: string
Type: boolean
Type: null
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