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.

Invalid input is returned to the client as a JSON-RPC error response (code -32602, Invalid params); each failing condition appears in the error’s data.extra array with its own errno. A validation error is raised when:

  • the snapshot does not exist

  • the rollback cannot be completed

Examples:

Roll back to a snapshot:

{"path": "tank/data@backup"}

Roll back, destroying more recent snapshots:

{"path": "tank/data@backup", "recursive": true}

Roll back all child datasets:

{"path": "tank@backup", "recursive_rollback": true}
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 and bookmarks 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