ITPub博客

首页 > 数据库 > > BigchainDB命令行

BigchainDB命令行

作者:gaokeke123 时间:2022-04-14 10:35:36 0 删除 编辑

bigchaindb --help

帮助信息,可以是bigchaindb -h

bigchaindb --version

查看版本,可以是bigchaindb -v

bigchaindb configure

获取配置文件,后端数据库类型只支持localmongodb,-c选项可指定配置文件路径。默认文件路径为$HOME/.bigchaindb,-y选项所有参数将使用默认值。

bigchaindb -c path/to/new_config.json configure localmongodb
  • 1

bigchaindb show-config

显示配置值

bigchaindb init

初始化,创建初始表、索引等。

bigchaindb drop

删除数据库。

bigchaindb start

启动BigchainDB,如果没有初始化会先执行bigchaindb init,可以用命令bigchaindb start --no-init跳过。用--log-level或-l指定日志的级别。

$ bigchaindb --log-level INFO start
  • 1

bigchaindb election

管理选举以管理BigchainDB网络。选举过程的细节在BEP-18中定义。选举管理分为几个子命令。下面是每个命令行的语法。

$ bigchaindb election new upsert-validator <public-key> <power> <node-id> --private-key <path-to-the-private-key>
  • 1
$ bigchaindb election new upsert-validator HHG0IQRybpT6nJMIWWFWhMczCLHt6xcm7eP52GnGuPY= 1 fb7140f03a4ffad899fabbbf655b97e0321add66 --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Submitted proposal with id: 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa
  • 1
  • 2
$ bigchaindb election new chain-migration --private-key <path-to-the-private-key>
  • 1
$ bigchaindb election new migration --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Submitted proposal with id: 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa
  • 1
  • 2
$ bigchaindb election approve <election-id> --private-key <path-to-the-private-key>
  • 1
$ bigchaindb election approve 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Your vote has been submitted
  • 1
  • 2
$ bigchaindb election show <election-id>

status=<status>
  • 1
  • 2
  • 3

bigchaindb tendermint-version

$ bigchaindb tendermint-version
{
    "description": "BigchainDB supports the following Tendermint version(s)",
    "tendermint": [
        "0.22.8"
    ]
}

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26692020/viewspace-3153315/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
大家好

注册时间:2013-08-14

  • 博文量
    1432
  • 访问量
    31577