When setting up a new Sentry, Validator, or Full Node server, it is recommended you use a snapshot for faster syncing without having to sync over the network. Using snapshots will save you several days for both Heimdall and Bor.
Please refer to https://snapshots.matic.today for the latest snapshots.
Using Snapshots
Heimdall
First, you need to set up your node with pre-requisites as per the node setup guide. Before you start services for Heimdall to sync, follow the below steps to use snapshot:
Download the Snapshot to your VM. To download the Snapshot Tar file to your VM you can run the following command
wget -c <Snapshot URL>
For example:
wget -c https://matic-blockchain-snapshots.s3-accelerate.amazonaws.com/matic-mainnet/heimdall-snapshot-2021-09-12.tar.gz
This will download the Snapshot of Heimdall.
Now, to unpack the Tar file in the Heimdall Data directory run the following command. You need to ensure that you’re running this command before you start the Heimdall service on your node. If your Heimdall service has started, please stop and then run the below command. Once unpacking is complete you can start the Heimdall service again.
tar -xzvf <snapshot file> -C <HEIMDALL_DATA_DIRECTORY>
For example:
tar -xzvf heimdall-snapshot-2021-09-12.tar.gz -C ~/.heimdalld/data/
Note that if your Heimdall data directory is different then please mention that directory name correctly. When this command completes, you can delete the tar file to reclaim space.
Bor
First, you need to set up your node with pre-requisites as per the node setup guide. Before you start services for Bor to sync, follow the below steps to use snapshot:
Download the Snapshot to your VM. To download the Snapshot Tar file to your VM you can run the following command
wget -c <Snapshot URL>
For example:
wget -c https://matic-blockchain-snapshots.s3-accelerate.amazonaws.com/matic-mainnet/bor-pruned-snapshot-2021-09-08.tar.gz
Now, to unpack the Tar file in the Bor Data directory run the following command. You need to ensure that you’re running this command before you start the Bor service on your node. If your Bor service has started, please stop and then run the below command. Once unpacking is complete you can start the Bor service again.
tar -xzvf <snapshot file> -C <BOR_DATA_DIRECTORY>
For example:
tar -xzvf bor-pruned-snapshot-2021-09-08.tar.gz -C ~/.bor/data/bor/chaindata
Note that if your bor data directory is different then please mention that directory name correctly. When this command completes, you can delete the tar file to reclaim space.