-
Notifications
You must be signed in to change notification settings - Fork 15
How to Kill the Olfullnode Process and Backup Credentials
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!
- 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
- 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
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
- Go to your node folder
cd $OLDATA
-
Make sure your olfullnode process is killed, as discussed above.
-
Backup all credential files
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
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
- keep your credential files in an offline secure place
© OneLedger 2018-2020 Contact Information