Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page Tree
expandCollapseAlltrue
rootSecure and Super Nodes


Panel
borderColorgrey
bgColorwhite
titleColorblack
borderWidth1
titleBGColorwhite
borderStylesolid
titleLanguages


Use SCP to Copy Blocks and Chainsate Folders and Files From an Existing Node

This guide will only work if the destination node has NOT been secured by RSA-Key authorization

NOTE: These steps are only for those who have an existing node with a full copy of the blockchain; depending on your node's location,  this may take between 5 and 10 minutes, if you have a fast connection for both nodes involved

  • Preparing Nodes
  • File Transfer
  • Bring Source Node Online
  • Start Destination Node




Source NodeCommand & DescriptionDestination Node

Preparing Nodes
1

You should see the following if zend is stopped

Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleSource Node

zenops@node01:~$ sudo systemctl stop zend zentracker
zenops@node01:~$ zen-cli getinfo
error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)


Open a second terminal and SSH into your source node (left) with it's non-root user

NOTE: You should now have two terminal windows open and connected to two separate nodes. Arrange the source node on the left side of your screen, and the destination node on the right side of your screen

NOTE: The zend daemon should be stopped to prevent transfer errors in the following steps, the tracker is also stopped to limit errors from the source node (left)

  • Execute the following on the source node (left)
Code Block
sudo systemctl stop zend zentracker
  • Execute the following on the destination node (right)
Code Block
zen-cli stop
  • Verify zend is stopped on both the source node (left) and destination node (right)
Code Block
zen-cli getinfo


You should see the following if zend is stopped

Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleDestination Node

zenops@node02:~$ zen-cli stop
Zen server stopping
zenops@node02:~$ zen-cli getinfo
error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)



File Transfer - Transfer blocks and chainstate folders and files recursively to the destination node from the source node
2







DON'T RUN THIS UNTIL AFTER THE COMMAND FOR THE DESTINATION NODE HAS BEEN EXECUTED!

Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleSource Node

zenops@node01:~$ scp -r ~/.zen/blocks/* zenops@node02.zentest.win:~/.zen/blocks/

zenops@node01:~$ scp -r ~/.zen/chainstate/* zenops@node02.zentest.win:~/.zen/chainstate/


Executed from the destination node (right)

  • Remove all files and folders from the blocks and chainstate directories on destination node (right)
Code Block
rm -rf ~/.zen/blocks/*
rm -rf ~/.zen/chainstate/*

____________________________________________________________________________________________________

Executed from the source node (left)

  • Replace <D_USER> with the non-root user of the destination node, replace <D_FQDN> with the fully-qualified domain name of the destination node, remove <brackets>
  • When prompted, enter the non-root user password for the destination node to execute the transfer
Code Block
scp -r ~/.zen/blocks/* <D_USER>@<D_FQDN>:~/.zen/blocks/
scp -r ~/.zen/chainstate/* <D_USER>@<D_FQDN>:~/.zen/chainstate/


RUN ON THE DESTINATION NODE FIRST, DO NOT RUN ON THE SOURCE NODE!

Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleDestination Node

zenops@node02:~$ rm -r ~/.zen/blocks/*
zenops@node02:~$ rm -r ~/.zen/chainstate/*

NOTE: You may get an error if these files do not exist, you can ignore this


Bring Source Node Online
3


Start zend and zentracker on the source node (left)

  • Execute the following on the source node (left)
Code Block
sudo systemctl start zend && sleep 8 && sudo systemctl start zentracker
  • You may exit from the source node (left) and close your terminal
Code Block
exit




Start Destination Node
4

Execute the zend daemon on the destination node (right) with the rescan option

NOTE: If your node is using systemd or monit and pm2, start those after the following, using instructions from step 3

  • Change ownership of blocks and chainstate folders recursively to the current user
Code Block
sudo chown -R $USER ~/.zen/{blocks,chainstate}
  • Start the zen daemon with rescanning
Code Block
zend --rescan && sleep 30
  • Check your current block count every 30 seconds
Code Block
watch -n 30 zen-cli getblockcount
  • Your destination node (right) has been successfully bootstrapped after verifying your blocks match the block height on the explorer linked above
  • exit the command with CTRL + c


Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleDestination Node

Every 30.0s: zen-cli getblockcount.............................................Fri Jun 8 08:25:24 2018

321301



Continue With Installation Guide
5

Return to part 3, step 17

Part 3.17 - Package Installation and Initial Configuration << Click Here


Bootstrap From an Existing Node (SCP Method)

Insert excerpt
Social Links
Social Links
nopaneltrue