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

# Data restoration

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[old doc.lw link]: https//doc.lucidworks.com/fusion/5.9/0iq2cv

[localhost link]: http://localhost:3000/docs/5/fusion/operations/config-sync/disaster-recovery

[mintlify link]: https://doc.lucidworks.com/docs/5/fusion/operations/config-sync/disaster-recovery

ConfigSync restore operation allows you to restore the Fusion config to a specific state.
To learn more about the ConfigSync repository and branches, see [Repo organization](/docs/5/fusion/operations/config-sync/repo-org).

<LwTemplate />

## Before you begin

Please make sure that ConfigSync pod is up and running. You can check it by running the following command:

```sh wrap  theme={"dark"}
kubectl get pods | grep config-sync
```

## Restore from the specific branch

To restore from the specific branch, use the `branch=<BRANCH_NAME>` request parameter.

### HTTP request

```http wrap  theme={"dark"}
PUT https://<FUSION-URL>/config-sync/restore?branch=<BRANCH_NAME>
Authorization: Basic <BASE64-ENCODED-AUTH>
```

### cURL request

```bash wrap  theme={"dark"}
curl -I -X PUT -u 'admin:<PASSWORD>' \
  'https://<FUSION-URL>/config-sync/restore?branch=<BRANCH_NAME>'
```

## Restore from a specific commit

First, get the commit SHA from the commit history.
To find the commit you want to restore from:

* Go to the Config Sync GitHub repository.
* Select the branch you want to restore from.
* Click on the `commits` link.
* Find the commit you want to restore from and click on the commit message to view the commit details.
* Copy the commit SHA from the commit details page or from the URL. Also, you could copy it from the commit history page.

To restore from a specific commit, use the `commit=<COMMIT_SHA>` request parameter. For example:

### HTTP request

```http wrap  theme={"dark"}
PUT https://<FUSION-URL>/config-sync/restore?commit=<COMMIT_SHA>
Authorization: Basic <BASE64-ENCODED-AUTH>
```

### cURL request

```bash wrap  theme={"dark"}
curl -I -X PUT -u 'admin:<PASSWORD>' \
  'https://<FUSION-URL>/config-sync/restore?commit=<COMMIT_SHA>'
```

## Restore from a specific date

To restore from a specific date, use the `date=<DATE>` request parameter. The date should be in the `YYYY-MM-DDTHH:MM:SSZ` UTC format.
For example: `2021-01-01T00:00:00Z`.
In this case ConfigSync restores the config to the state it was at the specified date.
Actually, it restores the config to the state it was at the last commit before the specified date.

### HTTP request

```http wrap  theme={"dark"}
PUT https://<FUSION-URL>/config-sync/restore?date=<DATE>
Authorization: Basic <BASE64-ENCODED-AUTH>
```

### cURL request

```bash wrap  theme={"dark"}
curl -I -X -u 'admin:<PASSWORD>' \
  'https://<FUSION-URL>/config-sync/restore?date=<DATE>'
```

## Restore specific apps

To restore specific apps, use the `apps=<APP1,APP2,…​>` request parameter. For example:

```bash wrap  theme={"dark"}
curl -I -X PUT -u 'admin:<PASSWORD>' \
  'https://<FUSION-URL>/config-sync/restore?branch=<BRANCH_NAME>&apps=app1,app2'
```

or

```bash wrap  theme={"dark"}
curl -I -X PUT -u 'admin:<PASSWORD>' \
  'https://<FUSION-URL>/config-sync/restore?commit=<COMMIT_SHA>&apps=app1,app2'
```

## Track the restore progress

Each restore operation is asynchronous. You can track the restore progress by checking logs in the ConfigSync pod.
