Skip to content

Instantly share code, notes, and snippets.

@barryz
Created August 15, 2022 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barryz/6a360fa4dcc89cad4f852a0508552b1a to your computer and use it in GitHub Desktop.
Save barryz/6a360fa4dcc89cad4f852a0508552b1a to your computer and use it in GitHub Desktop.
How to deploy an aurora full archive node

To deploy a full archive aurora rpc node, you need

  1. Completed a rpc node setup by following the instructions of aurora.
  2. Creating a script named download_archive_snapshot.sh which used to download archive snapshot.
#!/bin/sh
network="testnet"

if $(is-mainnet); then
        network="mainnet"
fi

mkdir -p /home/near/data/
s5cmd --stat --no-sign-request cp s3://near-protocol-public/backups/${network}/archive/"$(s5cmd  --no-sign-request cat s3://near-protocol-public/backups/${network}/archive/latest)"/* /home/near/data/
  1. Creating a dockerfile named Dockerfile which used to build a download image.
FROM nearaurora/nearcore:mainnet

COPY ./download_archive_snapshot.sh /usr/local/bin/download_archive_snapshot.sh
  1. Building the image by docker built -t nearaurora/nearcore:mainnet-archive -f Dockerfile .

  2. Downloading archive snapshot throught below command:

docker run --init --rm --name dl -v /snapshots/near/:/home/near:rw --entrypoint /usr/local/bin/download_archive_snapshot.sh -tid nearaurora/nearcore:mainnet-archive
  1. Replacing aurora data dir to downloaded archive snapshot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment