zfs.resource.snapshot.rename

Rename a ZFS snapshot.

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 new name already exists

  • a supplied path is invalid

Examples:

Rename a single snapshot:

{"current_name": "tank/data@old", "new_name": "tank/data@new"}

Rename matching snapshots in child datasets:

{"current_name": "tank@old", "new_name": "tank@new", "recursive": true}
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: data

data

Type: object

Rename parameters for renaming ZFS snapshots.

No Additional Properties

Current Name

Type: string

Current snapshot path (e.g., 'pool/dataset@old_name').

Must be at least 1 characters long

New Name

Type: string

New snapshot path (e.g., 'pool/dataset@new_name').

Must be at least 1 characters long

Recursive

Type: boolean Default: false

Recursively rename matching snapshots in child datasets.

Result

Type: null


Required roles: SNAPSHOT_WRITE