# Snapshots

A GIWA node snapshot is a compressed archive of recent node data. By starting from a snapshot and syncing from that point, you can set up a node much faster than syncing from genesis.

Snapshot data is updated **once per week**.

{% hint style="info" %}
A snapshot does not contain the chain tip (the latest block).

After restoring from a snapshot, your node must catch up by syncing the blocks produced after the snapshot was created until it reaches the latest tip.
{% endhint %}

### Set up a node using a snapshot

This guide assumes you are running a node using the Docker-based setup provided in the [giwa-io/node](https://github.com/giwa-io/node) repository.

#### 1. Clean up existing resources

Stop your existing node and remove (or back up) the node data directory.

Geth:

```zsh
docker compose down && rm -rf ./geth_data
```

Reth:

```zsh
docker compose down && rm -rf ./reth_data
```

#### 2. Prepare the node data directory

Geth:

```zsh
mkdir ./geth_data
```

Reth:

```zsh
mkdir ./reth_data
```

#### 3. Download the snapshot

Depending on the execution client and pruning mode you plan to run, execute one of the commands below.

{% hint style="warning" %}
Before downloading, make sure you have sufficient disk space available.
{% endhint %}

<table><thead><tr><th width="145.967041015625">Network</th><th width="112.8428955078125">Client</th><th width="104.3818359375">Pruning</th><th>Command</th></tr></thead><tbody><tr><td>GIWA Sepolia</td><td>Geth</td><td>Full</td><td><pre class="language-zsh"><code class="lang-zsh">curl -sL https://sepolia-snapshot.giwa.io/download.sh | sh -s -- -c geth -p full -o ./geth_data
</code></pre></td></tr><tr><td>GIWA Sepolia</td><td>Geth</td><td>Archive</td><td><pre class="language-zsh"><code class="lang-zsh">curl -sL https://sepolia-snapshot.giwa.io/download.sh | sh -s -- -c geth -p archive -o ./geth_data
</code></pre></td></tr><tr><td>GIWA Sepolia</td><td>Reth</td><td>Full</td><td><pre class="language-zsh"><code class="lang-zsh">curl -sL https://sepolia-snapshot.giwa.io/download.sh | sh -s -- -c reth -p full -o ./reth_data
</code></pre></td></tr><tr><td>GIWA Sepolia</td><td>Reth</td><td>Archive</td><td><pre class="language-zsh"><code class="lang-zsh">curl -sL https://sepolia-snapshot.giwa.io/download.sh | sh -s -- -c reth -p archive -o ./reth_data
</code></pre></td></tr></tbody></table>

#### 4. Extract the snapshot

Extract the downloaded snapshot archive into your data directory.

Geth:

```zsh
tar --zstd -xf <snapshot-file.tar.zst> -C ./geth_data​
```

Reth:

```zsh
tar --zstd -xf <snapshot-file.tar.zst> -C ./reth_data
```

#### 5. Start your GIWA node

Follow the instructions in the [giwa-io/node](https://github.com/giwa-io/node) repository and start your node using `docker compose`.


---

# 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.giwa.io/giwa-chain/en/node-operators/snapshots.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.
