Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Source NodeCommand & DescriptionDestination NodePreparing Nodes1You should see the following if zend is stopped

Page Tree
expandCollapseAlltrue
root安全节点+超级节点搭建教程


Panel
borderColorgrey
bgColorwhite
titleColorblack
borderWidth1
titleBGColorwhite
borderStylesolid
titleLanguages
SpanishEspañol

Use RSYNC 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

使用RSYNC复制区块,并从现有节点导入文件夹和文件

本指南仅在目标节点未通过RSA-Key授权进行保护时才有效

注意:这些步骤仅适用于具有区块链完整副本的现有节点的用户; 如果您有两个节点的快速连接,则可能需要5到10分钟,具体取决于您节点的位置

  • 准备节点
  • 文件传输
  • 导入在线源节点
  • 启动目标节点



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

源节点指令 & 描述目标节点

准备节点
1

如果zend停止,您可能会看到以下内容

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)









Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleSource Node

zenops@node01:~$ sudo apt-get install rsync -y

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)


打开第二个终端并使用它的非root用户通过SSH连接到源节点(左侧)

注意:您现在应该打开两个终端窗口并登陆到两个单独的节点。 将源节点排列在屏幕左侧,将目标节点排列在屏幕右侧

注意:应该停止zend守护程序以防止在以下步骤中传输错误,跟踪器也会停止以限制来自源节点的错误(左)

  • 在源节点上执行以下操作(左)
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)验证zend在源节点(左)和目标节点(右)上都已停止
Code Block
zen-cli getinfo
  • Install RSYNC on the source node (left) and destination node (right)源节点(左)和目标节点(右)上安装RSYNC
Code Block
sudo apt-get install rsync -y


You should see the following if zend is stopped如果zend停止,您应该看到以下内容

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)








Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleDestination Node

zenops@node02:~$ sudo apt-get install rsync -y

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



文件传输 - 从源节点将区块和区块链状态文件夹和文件传输到目标节点
2







在目标节点已被执行之后,请不要运行此操作!

Panel
borderColorgrey
bgColorblack
titleColorwhite
borderWidth2
titleBGColorblack
borderStylesolid
titleSource Node

zenops@node01:~$ rsync -rv ~/.zen/{blocks,chainstate} -e ssh zenops@node02.zentest.win:~/.zen/

Executed from the destination node (right)

Remove blocks and chainstate folders and files on destination node (right)


目标节点执行(右)

    • 删除目标节点上的块和链状态文件夹和文件(右)
Code Block
rm -r ~/.zen/{blocks,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

    源节点执行(左)

    • <D_USER>替换为目标节点的非root用户,将<D_FQDN>替换为目标节点的完全限定域名,删除<bracket>
    • 出现提示时,输入目标节点的非root用户密码以执行传输
    Code Block
    rsync -rv ~/.zen/{blocks,chainstate} -e ssh <D_USER>@<D_FQDN>:~/.zen/


    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,chainstate}

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

    Bring Source Node Online3

    Start zend and zentracker on the source node (left)

    Execute the following on the source node (left)

    注意:如果这些文件不存在,您可能会收到错误,您可以忽略它


    线上引入源节点
    3


    在源节点上启动zend和zentracker(左)

    • 在源节点上执行以下指令(左)
    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

    Check your node's block height, compare with:

    使用重新扫描选项在目标节点(右侧)上执行zend守护程序

    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

    注意: 如果您的节点使用systemd或monit和pm2,请使用步骤3中的说明启动以下节点

    • 以递归方式将区块和区块链状态文件夹的所有权更改为当前用户
    Code Block
    sudo chown -R $USER ~/.zen/{blocks,chainstate}
    • Start the zen daemon with rescanning通过重新扫描启动zen守护程序
    Code Block
    zend --rescan && sleep 30
    • Check your current block count every 30 seconds每30秒检查一次当前的区块数
    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验证块与上面链接的资源管理器的块高相匹配后,您的目标节点(右)已成功引导
    • 使用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 (RSYNC Method

    返回第3部分,第17步

    第3部分,第17步安装包与初始配置- << 点击返回


    从现有节点引入完整区块 (RSYNC 方法)

    Insert excerpt
    Social Links友情链接Social Links
    友情链接
    nopaneltrue