# Snapshot

**Chain ID:** stride-1

**Node Version:** v8.0.0

## Pre-requisite Setup

Configure the pruning settings as follows: **app.toml**

```toml
pruning = "custom"

pruning-keep-recent = "100"
pruning-keep-every = "0"
pruning-interval = "10"
```

**config.toml**

```toml
indexer = "null"
```

Install lz4 if not already installed. This guide assumes that a Debian based OS is used:

```bash
sudo apt update &&\

sudo apt install -y snapd &&\

sudo snap install lz4
```

Stop the node. If not using cosmovisor to manage the stride daemon, use whatever service you use to manage the stride daemon

```bash
sudo systemctl cosmovisor stop
```

Reset the node. Depending on the chain, this can be done in one of two ways.

**WARNING:** While this should not wipe the `priv_validator_key.json` file, you should back up this key on validators prior to running the following commands.

```bash
# On some tendermint chains, use this command to reset the node database
strided tendermint unsafe-reset-all --home $HOME/.stride

# On other tendermint chains, use this command if the above command did not work
strided unsafe-reset-all
```

## Basic Setup

Download the latest snapshot:

```bash
wget $(wget -q -O - https://eu2.contabostorage.com/3a857da4bd64407caf5c7a4f9af739b7:relyte-snapshots/stride_mainnet%2Flatest)
```

Extract the snapshot to the database location:

```bash
lz4 -c -d stride_*.tar.lz4  | tar -x -C $HOME/.stride
```

Restart the node assuming no errors were thrown while extracting the snapshot:

```bash
sudo systemctl cosmovisor start
```

Remove the snapshot archive to free up disk space

```bash
rm -v stride_*.tar.lz4
```

Make sure that the node is running without issues

```bash
sudo systemctl status cosmovisor
sudo journalctl -fu cosmovisor -o cat
```

## Advanced Setup (Recommended)

This method requires less disk space than the previous method and is less commands overall.

Download and unarchive the snapshot to the database directory

```bash
wget -O - $(wget -q -O - https://eu2.contabostorage.com/3a857da4bd64407caf5c7a4f9af739b7:relyte-snapshots/stride_mainnet%2Flatest) | lz4 -c -d - | tar -x -C $HOME/.stride
```

Make sure that the node is running without issues

```bash
sudo systemctl status cosmovisor
sudo journalctl -fu cosmovisor -o cat
```


---

# 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.cryptochemistry.io/mainnets/stride/snapshot.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.
