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”} })
No Additional Items
Tuple Validation
Parameter 1: data
data
Type: objectCreate parameters for creating ZFS snapshots.
No Additional PropertiesDataset
Type: stringDataset path to snapshot (e.g., 'pool/dataset').
Must be at least 1 characters long
Name
Type: stringSnapshot name (the part after @).
Must be at least 1 characters long
Recursive
Type: boolean Default: falseCreate snapshots recursively for child datasets.
Exclude
Type: array of string Default: []Datasets to exclude when creating recursive snapshots.
No Additional ItemsEach item of this array must be:
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: stringZFSResourceSnapshotEntry
Type: objectNo Additional Properties
Createtxg
Type: integerThe TXG in which the snapshot was created.
Guid
Type: integerA GUID for the snapshot.
Name
Type: stringThe zfs resource for the given snapshot.
Pool
Type: stringThe zpool of the snapshot.
Dataset
Type: stringThe zfs resource for the given snapshot.
Snapshot Name
Type: stringThe 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.
No Additional Items
Each item of this array must be:
Requested properties for the snapshot.
ZFSResourceSnapshotPropertiesEntry
Type: objectNo Additional Properties
Type
Type: object(READ-ONLY): Type of ZFS dataset (filesystem, volume, etc).
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
SourceValue
Type: objectNo Additional Properties
Type
Type: enum (of string)The source type.
Must be one of:
- "NONE"
- "DEFAULT"
- "TEMPORARY"
- "LOCAL"
- "INHERITED"
- "RECEIVED"
Value
The source value.
Value
The parsed raw value of the property.
Creation
Type: object(READ-ONLY): Timestamp when dataset was created.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Used
Type: object(READ-ONLY): Space used by dataset and descendants.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Referenced
Type: object(READ-ONLY): Space referenced by this dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Compressratio
Type: object(READ-ONLY): Property showing achieved compression ratio.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Createtxg
Type: object(READ-ONLY): Transaction group when dataset was created.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Guid
Type: object(READ-ONLY): Globally unique identifier for the dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Primarycache
Type: objectControls primary cache usage (all, metadata, or none).
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Secondarycache
Type: objectControls secondary cache usage (all, metadata, or none).
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Objsetid
Type: object(READ-ONLY): Object set identifier for the dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Mlslabel
Type: objectMulti-level security label for the dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Refcompressratio
Type: object(READ-ONLY): Compression ratio for referenced data.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Written
Type: object(READ-ONLY): Space referenced since previous snapshot.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Logicalreferenced
Type: object(READ-ONLY): Logical space referenced by dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Context
Type: objectSELinux security context for the dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Fscontext
Type: objectSELinux filesystem security context.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Defcontext
Type: objectSELinux default security context for new files.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Rootcontext
Type: objectSELinux root directory security context.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Encryption
Type: objectControls encryption cipher suite for the dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Encryptionroot
Type: object(READ-ONLY): Property showing encryption root dataset.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Keystatus
Type: object(READ-ONLY): Encryption key status (available/unavailable).
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Redact Snaps
Type: object(READ-ONLY): List of redaction snapshots.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Prefetch
Type: objectControls prefetch behavior (all, metadata, or none).
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Devices
Type: objectControls whether device files can be opened.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Exec
Type: objectControls whether programs can be executed from filesystem.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Setuid
Type: objectControls setuid/setgid bit respect on executable files.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Xattr
Type: objectControls extended attribute behavior (on, off, sa, dir).
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Version
Type: object(READ-ONLY): Filesystem version number.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Utf8Only
Type: objectControls whether only UTF-8 filenames are allowed.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Normalization
Type: objectUnicode normalization property for filenames.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Casesensitivity
Type: objectDetermines filename matching algorithm sensitivity.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Nbmand
Type: objectControls non-blocking mandatory locking behavior.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Acltype
Type: objectSpecifies type of ACL to use (off, nfsv4, posix).
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Defaultuserquota
Type: objectDefault space quota for new users.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Defaultgroupquota
Type: objectDefault space quota for new groups.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Defaultprojectquota
Type: objectDefault space quota for new projects.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Defaultuserobjquota
Type: objectDefault object quota for new users.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Defaultgroupobjquota
Type: objectDefault object quota for new groups.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Defaultprojectobjquota
Type: objectDefault object quota for new projects.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
Volsize
Type: objectLogical size of the volume.
No Additional PropertiesRaw
Type: stringThe raw value of the property.
The source from where this property received its value.
Value
The parsed raw value of the property.
User Properties
User-defined properties for snapshots.
Each additional property must conform to the following schema
Type: stringRequired roles: SNAPSHOT_WRITE