# Steps to apply snapshot for recovery

Snapshots for sharder is maintained periodically. So in case if any sharder is broken, it can be recovered with the help of zus team.

## Steps that will be executed using script are:

1. Stop the existing sharder and postgres on the server.
2. Script will create a backup of an older data and move it to the `data_backup`.
3. Snapshot will be downloaded from zus s3 bucket.
4. Files will be extracted to the required folder automatically.
5. Required fix will be updated via sharder image tag.
6. Sharder will be started again.

Run the following command:

```
wget -N https://raw.githubusercontent.com/0chain/zcnwebappscripts/as-deploy/0chain/sharder_snapshot_recovery.sh; bash sharder_snapshot_recovery.sh v1.13.5 sharder1_0chain_net 21Mar2024
```

It will take several hours to complete the script. Once is it completed you can verify it using below steps/commands.

### Check if container started successfully

Both `sharder-1` & `sharder-postgres-1` needs to be in running status.

```
sudo docker ps -a | grep "sharder"
```

<figure><img src="/files/biOgAe6UydLfFQf2QMrL" alt=""><figcaption></figcaption></figure>

### Confirming that your sharder is available on public URL

1. If all the previous steps have been successfully executed, sharder should be available on below url:
   * `https://<domain_name>/sharder01/`
   * The sharder diagnostics page can be reached from the below url:

     * `https://<domain_name>/sharder01/_diagnostics`

     Please check for any errors

If you see any errors, or cannot access the services on your domain, please contact support.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zus.network/as-onboarding/sharder/steps-to-apply-snapshot-for-recovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
