Blockchain snapshots

Download blockchains state in order to set up a validator node or RPC. See nearcore for more information on node requirements and usage.

Also, visit https://near-nodes.io for comprehensive details.

The instructions below utilize logic from this FastNEAR repository: https://github.com/fastnear/static

Mainnet

Snapshot (pruned)

Note: this is likely the preferred approach for syncing, as opposed to downloading an archival snapshot, which is significantly larger and more special-purpose.

Run this command to download and execute the shell script.

We've added the environment variable DATA_PATH to point to a local directory we've created, overriding the default destination location: /root

The CHAIN_ID env var defaults to mainnet, so we omit it.

Review full command, copy below:

 
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone.sh | DATA_PATH=~/mainnet-snap sh

mainnet snapshot » ~/mainnet-snap
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone.sh | DATA_PATH=~/mainnet-snap sh

Archival snapshot

Time and storage intensive

 

Be prepared for a large download and the inherent time constraints involved.

Here, the DATA_PATH environment variable sets the destination download directory to ~/mainnet-snap-archival

Review full command, copy below:

 
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone_archival.sh | DATA_PATH=~/mainnet-snap-archival sh

mainnet archive » ~/mainnet-snap-archival
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone_archival.sh | DATA_PATH=~/mainnet-snap-archival sh

Testnet

Snapshot (pruned)

Environment variables:

  • DATA_PATH sets the destination download directory to ~/testnet-snap
  • CHAIN_ID sets the blockchain network to testnet (default is mainnet)
Review full command, copy below:

 
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone.sh | CHAIN_ID=testnet DATA_PATH=~/testnet-snap sh

testnet snapshot » ~/testnet-snap
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone.sh | CHAIN_ID=testnet DATA_PATH=~/testnet-snap-archival sh