zfs.go
func (d *Dataset) Rollback(destroyMoreRecent bool) error {
	if d.Type != DatasetSnapshot {
		return errors.New("can only rollback snapshots")
	}

	args := make([]string, 1, 3)
	args[0] = "rollback"
	if destroyMoreRecent {
		args = append(args, "-r")
	}
	args = append(args, d.Name)

	_, err := zfs(args...)
	return err
}
func (d *Dataset) Rollback(destroyMoreRecent bool) error {
	if d.Type != DatasetSnapshot {
		return errors.New("can only rollback snapshots")
	}

	args := make([]string, 1, 3)
	args[0] = "rollback"
	if destroyMoreRecent {
		args = append(args, "-r")
	}
	args = append(args, d.Name)

	_, err := zfs(args...)
	return err
}
func ( d * Dataset ) Rollback ( destroyMoreRecent bool ) error { if d . Type != DatasetSnapshot { return errors . New ( " " ) } args := make ( [ ] string , 1 , 3 ) args [ 0 ] = " " if destroyMoreRecent { args = append ( args , " " ) } args = append ( args , d . Name ) _ , err := zfs ( args ... ) return err }
// Rollback rolls back the receiving ZFS dataset to a previous snapshot.
// Optionally, intermediate snapshots can be destroyed.  A ZFS snapshot
// rollback cannot be completed without this option, if more recent
// snapshots exist.
// An error will be returned if the input dataset is not of snapshot type.
Rollback rolls back the receiving ZFS dataset to a previous snapshot . Optionally intermediate snapshots can be destroyed . A ZFS snapshot rollback cannot be completed without this option if more recent snapshots exist . An error will be returned if the input dataset is not of snapshot type .