% zelta-revert(8) | System Manager's Manual
zelta revert - rewind a ZFS dataset tree in place by renaming and cloning
zelta revert [OPTIONS] endpoint[@snapshot]
zelta revert rewinds a dataset to a previous snapshot state by renaming the current dataset and creating a clone from the specified snapshot. This technique is a non-destructive alternative to zfs rollback, preserving the current state for forensic analysis, testing, or recovery scenarios.
As with other Zelta commands, zelta revert works recursively on a dataset tree. The endpoint may be local or remote via ssh(1).
After reverting, the original dataset remains accessible under a new name, allowing you to examine both the reverted state and the preserved current state.
zelta revert performs these operations:
@snapshot name is specified at the end of the endpoint, that snapshot is used. Otherwise, the most recent snapshot is selected.pool/ds reverted to snapshot @yesterday becomes pool/ds_yesterday. Note that no properties, including mountpoint and readonly status, are altered.Remote endpoint names follow scp(1) conventions. Dataset names follow zfs(8) naming conventions.
Examples:
Local: pool/dataset
Local: pool/dataset@snapshot
Remote: user@example.com:pool/dataset
Remote: user@example.com:pool/dataset@snapshot
Endpoint Argument (Required)
endpoint
: The endpoint name to revert, optionally specifying a snapshot. If no snapshot is specified, the most recent snapshot is used.
Output Options
-v, --verbose
: Increase verbosity. Specify once for operational detail, twice (-vv) for debug output.
-q, --quiet
: Quiet output. Specify once to suppress warnings, twice (-qq) to suppress errors.
-n, --dryrun, --dry-run
: Display zfs commands without executing them.
Revert a dataset to its most recent snapshot to investigate a bug while preserving the current state:
zelta revert sink/source
The current dataset is renamed to sink/source_<snapshot> and a clone is created at the original path.
Revert a remote dataset to a specific snapshot:
zelta revert production-host.example:sink/dataset@2025-12-31
After reverting a source dataset, rotate its backup targets to restore sync continuity:
zelta revert sink/source/dataset
zelta rotate sink/source/dataset backup-host.example:tank/target/dataset
The original diverged datasets remain accessible as sink/source/dataset_<snapshot> and tank/target/dataset_<snapshot>.
Returns 0 on success, non-zero on error.
See zelta-options(7) for environment variables, zelta.env configuration, and zelta policy integration.
zelta(8), zelta-options(7), zelta-match(8), zelta-backup(8), zelta-policy(8), zelta-clone(8), zelta-rotate(8), ssh(1), zfs(8)
Daniel J. Bell <bellhyve@zelta.space>