# Snapshot

## Snapshot

<figure><img src="https://raw.githubusercontent.com/StakeandRelax-Validator/documentation/main/Logos/cosmos.png" alt="" width="150"><figcaption></figcaption></figure>

**Chain ID**: cosmoshub-4 | **Latest Version Tag**: v26.0.0

{% hint style="info" %}
Snapshots allows a new node to join the network by recovering application state from a backup file. Snapshot contains compressed copy of chain data directory. To keep backup files as small as plausible, snapshot server is periodically beeing state-synced.
{% endhint %}

Snapshots are taken automatically every 24 hours

<https://snapshots.stakeandrelax.net/snapshots/cosmos/snapshot/snapshot\\_latest.tar.lz4>

### Instructions

#### Stop the service and reset the data

```bash
sudo systemctl stop cosmos
cp $HOME/.gaia/data/priv_validator_state.json $HOME/.gaia/priv_validator_state.json.backup
rm -rf $HOME/.gaia/data
```

#### Download latest snapshot

```bash
curl -L https://snapshots.stakeandrelax.net/snapshots/cosmos/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.gaia
mv $HOME/.gaia/priv_validator_state.json.backup $HOME/.gaia/data/priv_validator_state.json
```

## Add seeds

```bash
sed -i -e "s|^seeds *=.*|seeds = \"04f3c070dac1248e981c8a7650b4fe3ea0cea741@176.9.30.178:15056\"|" $HOME/.gaia/config/config.toml
```

#### Restart the service and check the log

```bash
sudo systemctl start cosmos && sudo journalctl -u cosmos -f --no-hostname -o cat
```
