Jump to content

Quick updates of linux nodes

Recommended Posts

There's a method to update really fast and smooth your linux node. I will try to explain, keep in mind that this tutorial is useful if you had installed the node from the github repository of scripts elrond-go-scripts. If you don't have the node installed from this repository this code can be wrong. I always make the installation of elrond-go-scripts on my home, be careful with the instructions that imply this folder.

1.- Before we start make a copy of your pems:

mkdir ~/backup-pems

cp ~/go/src/github.com/ElrondNetwork/elrond-go-node/config/*pem ~/backup-pems

2.- Close your node:

If you use screen launch you can do: screen -S nameofyourscreen -X quit

3.- Update your scripts repo:

cd ~/elrond-go-scripts/ubuntu-amd64

bash get-github-repo.sh

4.- Update your node from the scripts repo

bash update.sh (I guess that you're in the same folder)

At this point your elrond-go-node is updated, you need to restore your keys

5.- Restore your registered keys:

cp ~/backup-pems/*pem ~/go/src/github.com/ElrondNetwork/elrond-go-node/config

6.- Maybe delete db, logs and stats

Only If the testnet update require to cleanup all this stuff then:

rm -r ~/go/src/github.com/ElrondNetwork/elrond-go-node/db

rm -r ~/go/src/github.com/ElrondNetwork/elrond-go-node/stats

rm -r ~/go/src/github.com/ElrondNetwork/elrond-go-node/logs

7.- Start again your node

I like to launch it on screen but it's up to you:

cd ~/src/github.com/ElrondNetwork/elrond-go-node

screen -AmdS testnet ./node

(it creates a virtual screen with name testnet and the node running inside)

If you want to see the node running

screen -r testnet

If you want to exit the screen without stop your node

Press Ctrl+A and then press D

  • Like 1
  • Thanks 1
Link to post
Share on other sites

As a Bonus track, if you never installed from this source it's easy on linux:

1.- Be sure that you have Git installed

sudo apt install git

2.- Clone the repository on your home

cd ~

git clone https://github.com/ElrondNetwork/elrond-go-scripts.git

(This has created a folder elrond-go-scripts in your home)

3.- The first time we install prerequisites

cd ~/elrond-go-scripts/ubuntu-amd64

bash _prerequisite.sh

4.- Install de node

bash install.sh

It will ask you about your Nodename and will create new identity (new pem keys) to you.

You will have when it finish a folder ~/src/github.com/ElrondNetwork/elrond-go-node where is your node ready for run it

5.- Make a backup of your keys just in case

mkdir -p ~/backup-pems

cp ~/src/github.com/ElrondNetwork/elrond-go-node/config/*pem ~/backup-pems

6.- Start your node

You can start your node from the installation or later.

I like to open it as virtual screen with:

cd ~/src/github.com/ElrondNetwork/elrond-go-node/

screen -AmdS testnet ./node

From here, never do install again, always the procedure above about updating nodes.



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...