Instructions for Polygon Amoy Bor Snapshot

The instructions below will fully restore Bor's data directory by downloading each file and subdirectories individually. Use aria2 or wget to download all of the Bor files. Last, modify the ownership of the files so Bor can access them.

Tools to use

wget, which is ultimate command line downloader. However, wget failed to accelerate download speed.

For ultra fast downloading use aria2. It is a utility for downloading files. aria2 supported HTTP(S) protocols. It tries to utilize maximum download bandwidth.

Please download the file that will tell aria2c which files to download and which directory to save them to. Then, use aria2c to download all of the files.

  1. Stop the bor services

service bor stop
//OR
systemctl stop bor.service
  1. Navigate to the directory with your bor data store in it, then download the compress file.

cd /var/lib/bor/data/bor/

wget https://snapshots.girnaartech.com/polygon/amoy-testnet/bor-amoy-testnet-files.txt
  1. Take a backup of existing bor data

cp -frvp chaindata <destination-backup-Directory>
  1. Remove data directory from /var/lib/bor/data/bor

rm -r ./chaindata
  1. Open tmux or use screen/nohup to keep downloading after you close your connection.

  2. 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).

sudo aria2c -j 12 -x 12 --console-log-level=warn --auto-file-renaming=false --summary-interval=3600 -c -i ./bor-amoy-testnet-files.txt

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/bor/${TIMESTAMP}-bor-amoy-testnet/

This will download files with current user ownership. We need to change it to bor: nogroup .

sudo chown -R bor:nogroup /var/lib/bor
  1. That's it! Start Bor and check the logs.

Last updated