---
title: "ezgh flags restore"
description: "Restore an old version of a flag's targeting."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh flags restore

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh flags restore <key> --env <environment> --version N [--comment text] [flags]
```

Write an old version of a flag's targeting in one environment as a new version (history is never rewritten). It's refused when that version serves a variation or uses a segment that's gone, and when someone else changes the config at the same moment.

Part of [`ezgh flags`](/cli/reference/flags).

## Examples

```sh
ezgh flags restore new-checkout --env production --version 11 --comment "Back to 10%"
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--comment` | string |  | why, kept with the new version |
| `--env` | string |  | the environment's key (required) |
| `--version` | int64 |  | the version to restore (required) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/flags-restore/index.mdx
