zfs.resource.snapshot.destroy ============================= Destroy ZFS snapshots. Args: data: Destroy parameters containing: - path: Snapshot path (e.g., 'pool/dataset@snapshot') or dataset path when all_snapshots=True (e.g., 'pool/dataset'). - recursive: Recursively destroy matching snapshots in child datasets. - all_snapshots: If True, path is a dataset and all its snapshots are destroyed. - defer: Defer destruction if snapshot is in use (e.g., has clones). Returns: None on success. Raises: ValidationError: If snapshot not found, has clones (without defer), or has holds. Examples: # Destroy a single snapshot destroy({"path": "tank/data@backup"}) # Destroy recursively (all matching child snapshots) destroy({"path": "tank@backup", "recursive": True}) # Defer destruction if in use destroy({"path": "tank/data@snap", "defer": True}) # Destroy all snapshots for a dataset destroy({"path": "tank/data", "all_snapshots": True}) # Destroy all snapshots for a dataset and its children destroy({"path": "tank", "all_snapshots": True, "recursive": True}) .. raw:: html
Destroy parameters for removing ZFS snapshots.
No Additional PropertiesPath to destroy. Either a snapshot path (e.g., 'pool/dataset@snapshot') or a dataset path when all_snapshots=True (e.g., 'pool/dataset').
Must be at least 1 characters long
Recursively destroy matching snapshots in child datasets.
If True, path should be a dataset path and all its snapshots will be destroyed.
Defer destruction if snapshot is in use (e.g., has clones).