Instructions for Polygon Erigon Snapshot
The instructions below will fully restore Erigon's data directory by downloading each file and subdirectories individually. Use aria2 or wget to download all of the Erigon files. Last, modify the ownership of the files so Erigon can access them.
Stop the erigon services
service erigon stop
//OR
systemctl stop erigon.service
Navigate to the directory with your erigon data store in it, then download the compress file.
cd /var/lib/erigon/
Take a backup of existing erigon data
cp -frvp /var/lib/erigon/data
Remove data directory from /var/lib/erigon/
rm -r ./data
Open tmux or use screen/nohup to keep downloading after you close your connection.
Download the files using aria2c. This will download up to 12 files at a time (-j 12) and will use up to 12 connections to the server (-x 12).
TIMESTAMP=$(date +"%Y-%m-%d"); aria2c -j 22 -x 16 -s 32 -c https://snapshots.girnaartech.com/polygon/amoy-testnet/erigon/${TIMESTAMP}-erigon-amoy-testnet/erigon.tar.zst
Decompress the file using zstd utility
zstd -d erigon.tar.zst -c | tar -xvf -
OR you can use wget.
Create a timestamp with the current date and Download the files using wget:
TIMESTAMP=$(date +"%Y-%m-%d"); wget -q --show-progress -m -r -nH --cut-dirs=4 --no-parent --reject="index.html*" https://snapshots.girnaartech.com/polygon/amoy-testnet/erigon/${TIMESTAMP}-erigon-amoy-testnet/erigon.tar.zst
This will download files with current user ownership. Change all files to be owned by erigon and the erigon group.
sudo chown -R erigon:erigon /var/lib/erigon
That's it! Start Erigon and check the logs.
Last updated