Skip to content

How to Kill the Olfullnode Process and Backup Credentials

manikanta472 edited this page Jan 23, 2022 · 1 revision

This tutorial applies to the below scenario you may find yourself in:

Your fullnode is running, and you want to kill the process for a period of time(e.g. for updating deployment)

If your Fullnode is running in GCP image or Docker, please add sudo before commands in this tutorial, and DO NOT SHUT DOWN the gcp machine/image!

Kill the olfullnode process

  1. check if your fullnode is running
ps aux | grep olfullnode

if you see the result similar to below, then proceed to next step:

For different environment the result structure may be different, what we need is the process number in this step

  1. kill the fullnode process

Use the process number from last step that has a description of /some_path/olfullnode node ..., which is 10870 in this case:

kill 10870

Backup Your Credential

This is recommended if you are a validator

You want to backup your keys to a secure place, to avoid potential loss

**If you are using docker to run the node, follow this

  1. Go to your node folder
cd $OLDATA
  1. Make sure your olfullnode process is killed, as discussed above.

  2. Backup all credential files

3.1 If your node is in a local machine

cp -r consensus/ PATH_TO_DESTINATION_FOLDER/
cp -r nodedata/ PATH_TO_DESTINATION_FOLDER/

If there is keystore folder under $OLDATA:

cp -r keystore PATH_TO_DESTINATION_FOLDER/

after this step, see if the files are there:

cd PATH_TO_DESTINATION_FOLDER
ls

it will show the result similar to below:

consensus nodedata keystore

3.2 If your node is in gcp

mkdir ~/olbackup
sudo cp -r consensus/ ~/olbackup/
sudo cp -r nodedata/ ~/olbackup/

if there is keystore folder under $OLDATA:

sudo cp -r keystore ~/olbackup
cd ~

change the permission of the backup folder

sudo chmod -R 777 olbackup

compress the backup to a file

tar -cvf backup.tar olbackup
ls

you will see a file names backup.tar in current folder

after this, remove the folder:

rm -rf olbackup

and check if the backup.tar file can be successfully decompressed:

tar -xvf backup.tar

after this step, see if the files are there:

ls

you will see a folder names olbackup in current folder

cd olbackup
ls

you will see similar to below

consensus nodedata  keystore

finally download the backup file

cd ~
pwd

this will show the current path as CURRENT_PATH for example

then find the setting button at top right corner, and click "Download File", then input CURRENT_PATH/backup.tar

  1. keep your credential files in an offline secure place
Clone this wiki locally