Mainnet
Optimized Mainnet Snapshot
This is likely the preferred approach for syncing, as opposed to downloading an archival snapshot, which is significantly larger and more special-purpose.
Nodes with sufficient resources can take advantage of setting the $RPC_TYPE flag to fast-rpc. (Default is rpc)
Before running the snapshot download script, you can set the following environment variables:
CHAIN_IDto eithermainnetortestnet. (default:mainnet)RPC_TYPEto eitherrpc(default) orfast-rpcTHREADSto the number of threads you want to use for downloading. Use128for 10Gbps, and16for 1Gbps (default:128).TPSLIMITto the maximum number of HTTP new actions per second. (default:4096)BWLIMITto the maximum bandwidth to use for download in case you want to limit it. (default:10G)DATA_PATHto the path where you want to download the snapshot (default:~/.near/data)BLOCKto the block height of the snapshot you want to download. If not set, it will download the latest snapshot.
Run this command to download the RPC Mainnet snapshot:
We will set the following environment variables:
DATA_PATH=~/.near/data- the standard nearcore pathCHAIN_ID=mainnet- to explicitly specify the mainnet dataRPC_TYPE=fast-rpc- select optimized approach
RPC Mainnet Snapshot » ~/.near/data:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone.sh | DATA_PATH=~/.near/data CHAIN_ID=mainnet RPC_TYPE=fast-rpc bash
RPC Mainnet Snapshot
This is the standard method to obtain a snapshot without the high performance from the previous section covering optimized snapshots.
Before running the snapshot download script, you can set the following environment variables:
CHAIN_IDto eithermainnetortestnet. (default:mainnet)RPC_TYPEto eitherrpc(default) orfast-rpcTHREADSto the number of threads you want to use for downloading. Use128for 10Gbps, and16for 1Gbps (default:128).TPSLIMITto the maximum number of HTTP new actions per second. (default:4096)BWLIMITto the maximum bandwidth to use for download in case you want to limit it. (default:10G)DATA_PATHto the path where you want to download the snapshot (default:~/.near/data)BLOCKto the block height of the snapshot you want to download. If not set, it will download the latest snapshot.
Run this command to download the RPC Mainnet snapshot:
We will set the following environment variables:
DATA_PATH=~/.near/data- the standard nearcore pathCHAIN_ID=mainnet- to explicitly specify the mainnet data
RPC Mainnet Snapshot » ~/.near/data:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone.sh | DATA_PATH=~/.near/data CHAIN_ID=mainnet bash
Archival Mainnet snapshot
Time and storage intensive.
Be prepared for a large download and the inherent time constraints involved.
The snapshot size is ~60Tb and contains more than 1M files.
Before running the download script, you can set the following environment variables:
CHAIN_IDto eithermainnetortestnet. (default:mainnet)THREADSto the number of threads you want to use for downloading. Use128for 10Gbps, and16for 1Gbps (default:128).TPSLIMITto the maximum number of HTTP new actions per second. (default:4096)DATA_TYPEto eitherhot-dataorcold-data(default:cold-data)BWLIMITto the maximum bandwidth to use for download in case you want to limit it. (default:10G)DATA_PATHto the path where you want to download the snapshot (default:/mnt/nvme/data/$DATA_TYPE)BLOCKto the block height of the snapshot you want to download. If not set, it will download the latest snapshot.
By default, the script assumes the paths for the data:
- Hot data (has to be on NVME):
/mnt/nvme/data/hot-data - Cold data (can be on HDDs):
/mnt/nvme/data/cold-data
Run the following commands to download the Archival Mainnet snapshot:
- Download the latest snapshot block height:
Latest archival mainnet snapshot block:
LATEST=$(curl -s "https://snapshot.neardata.xyz/mainnet/archival/latest.txt")
echo "Latest snapshot block: $LATEST"
- Download the HOT data from the snapshot. It has to be placed on NVME.
We will set the following environment variables:
DATA_TYPE=hot-data- downloads the Hot dataDATA_PATH=~/.near/data- the standard nearcore pathCHAIN_ID=mainnet- to explicitly specify the mainnet dataBLOCK=$LATEST- specify the snapshot block
Archival Mainnet Snapshot (hot-data) » ~/.near/data:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone_archival.sh | DATA_TYPE=hot-data DATA_PATH=~/.near/data CHAIN_ID=mainnet BLOCK=$LATEST bash
- Download the COLD data from the snapshot. It can be placed on HDDs.
We will set the following environment variables:
DATA_TYPE=cold-data- downloads the Hot dataDATA_PATH=/mnt/hdds/cold-data- the path where to place cold data. Note: the nearcore config should point cold data store to the same path.CHAIN_ID=mainnet- to explicitly specify the mainnet dataBLOCK=$LATEST- specify the snapshot block
Archival Mainnet Snapshot (cold-data) » /mnt/hdds/cold-data:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/fastnear/static/refs/heads/main/down_rclone_archival.sh | DATA_TYPE=cold-data DATA_PATH=/mnt/hdds/cold-data CHAIN_ID=mainnet BLOCK=$LATEST bash