zfs.resource.snapshot.rollback ============================== Rollback a ZFS dataset to a snapshot. .. warning:: This is a destructive change. All data written since the target snapshot was taken will be discarded. A validation error is raised when: - the snapshot, or a child's snapshot, does not exist (errno ``ENOENT``) - ``path`` is not a snapshot path (errno ``EINVAL``) - snapshots more recent than ``path`` exist and neither ``recursive`` nor ``recursive_clones`` was passed (errno ``EINVAL``) - ``path`` is a protected path and the call did not come from the middleware itself (errno ``EACCES``) The call fails when: - a snapshot that has to be destroyed first has holds, or has clones and ``recursive_clones`` was not passed (errno ``EBUSY``); release a hold with :doc:`zfs.resource.snapshot.release ` - a destroy or the rollback itself fails, with the errno the kernel reported Examples: Roll back to a snapshot: .. code:: json {"path": "tank/data@backup"} Roll back, destroying more recent snapshots: .. code:: json {"path": "tank/data@backup", "recursive": true} Roll back all child datasets: .. code:: json {"path": "tank@backup", "recursive_rollback": true} .. raw:: html
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: data

data

Type: object

Rollback parameters for rolling back to ZFS snapshots.

No Additional Properties

Path

Type: string

Snapshot path to rollback to (e.g., 'pool/dataset@snapshot').

Must be at least 1 characters long

Recursive

Type: boolean Default: false

Destroy any snapshots more recent than the one specified.

Recursive Clones

Type: boolean Default: false

Like recursive, but also destroy any clones.

Force

Type: boolean Default: false

Force unmount of any clones.

Recursive Rollback

Type: boolean Default: false

Do a complete recursive rollback of each child snapshot. Fails if any child lacks the snapshot.

Result

Type: null


*Required roles:* SNAPSHOT_WRITE