#gStore-weekly | gStore新版本0.9.1之help指令详解
gStore新版本重新规划了本地操作指令格式,并引入--help指令,可以查看各功能的详细指令格式,接下来我们使用help指令来查看各个本地操作指令的帮助信息。
1、bin/gbuild
该命令为创建数据库指令,通过bin/gbuild--help
可查看该命令的帮助信息,如下所示:
$ bin/gbuild --help
gStore Build Tools(gbuild)
Usage: bin/gbuild -db [dbname] -f[filename]
Options:
-h,--help Display this message.
-db,--database, the database name.
-f,--file, the file path for building.
2、bin/gquery
该命令为数据库查询指令,通过bin/gquery --help可查看该命令的帮助信息,如下所示:
$ bin/gquery --help
gStore Query Data Tools(gquery)
Usage: bin/gquery -db [dbname] -q[backup_path]
Options:
-h,--help Display this message.
-db,--database, the database name.
-q,--queryfile, the query file path
-f,--resultfile [option] , the result file path
3、bin/ghttp
该命令为开启ghttp服务指令,提供外部访问接口功能,通过bin/ghttp --help可查看该命令的帮助信息,如下所示:
$ bin/ghttp --help
gStore HTTP Server(ghttp)
Usage: bin/ghttp -db [dbname] -p [port]-c [enable]
Options:
-h,--help Display this message.
-db,--database[option], the database name.Default value isempty. Notice that the name can not end with .db
-p,--port[option], the listen port. Default value is9000.
-c,--csr[option], Enable CSR Struct or not. 0denote that false, 1 denote that true. Default value is 0.
4、bin/gadd
该命令为新增数据指令,通过bin/gadd --help可查看该命令的帮助信息,如下所示:
$ bin/gadd --help
gStore Batch Insert Data Tools(gadd)
Usage: bin/gadd -db [dbname] -f[filename]
Options:
-h,--help Display this message.
-db,--database, the database name.
-f,--file, the file path for inserting data.
5、bin/gsub
该命令为删除数据指令,通过bin/sub --help可查看该命令的帮助信息,如下所示:
$ bin/gsub --help
gStore Batch Delete Data Tools(gadd)
Usage: bin/gsub -db [dbname] -f[filename]
Options:
-h,--help Display this message.
-db,--database, the database name.
-f,--file, the file path to delete data.
6、bin/gmonitor
该命令为统计数据库信息指令,通过bin/gmonitor --help可查看该命令的帮助信息,如下所示:
$ bin/gmonitor --help
gStore Monitor Data Tools(gmonitor)
Usage: bin/gmonitor -db [dbname]
Options:
-h,--help Display this message.
-db,--database, the database name.
7、bin/gdrop
该命令为删除数据库指令,通过bin/gdrop --help可查看该命令的帮助信息,如下所示:
$ bin/gdrop --help
gStore Drop Database Tools(gdrop)
Usage: bin/gdrop -db [dbname]
Options:
-h,--help Display this message.
-db,--database, the database name.
8、bin/gexport
$ bin/gexport --help
gStore Export Data Tools(gexport)
Usage: bin/gexport -db [dbname] -f[backup_path]
Options:
-h,--help Display this message.
-db,--database, the database name.
-f,--file [optional], the export path,defalut export file path iscurrent path,the path should not include your database's name!
-db,--database:数据库名称
-f,--file:导出的nt文件路径,可选参数,默认导出到gstore根目录下
9、bin/shutdown
该命令为关闭ghttp服务指令,通过bin/shutdown --help可查看该命令的帮助信息,如下所示:
$ bin/shutdown --help
Shutdown the ghttp server
Usage: bin/shutdown -p [port]
Options:
-h,--help Display this message.
-p,--port, the ghttp server listen port.
10、bin/ginit
该命令为初始化数据库指令,通过bin/ginit --help可查看该命令的帮助信息,如下所示:
$ bin/ginit --help
gStore Initialize Data Tools(ginit)
Usage: bin/ginit -db [dbname]
Options:
-h,--help Display this message.
-db,--database, The database names.Use , to splitdatabase name. e.g. databaseA,databaseB
If you want to rebuild the system database,please use bin/ginit
If you want to add database info into system database,please use bin/ginit -dbdb1,db2,...
11、bin/gbackup
该命令为备份数据库指令,通过bin/gbackup --help可查看该命令的帮助信息,如下所示:
$bin/gbackup --help
gStore Backup Tools(gbackup)
Usage: bin/gbackup -db [dbname] -p[backup_path]
Options:
-h,--help Display this message.
-db,--database, the database name.
-p,--path [optional], the backup path,defalut backup_path =./backups,the path should not include your database's name!
12、bin/grestore
该命令为恢复数据库指令,通过bin/grestore--help可查看该命令的帮助信息,如下所示:
$bin/grestore --help
gStore Restore Database Tools(grestore)
Usage: bin/grestore -db [dbname] -p[path]
Options:
-h,--help Display this message.
-db,--database, the database name.
-p,--path, the backup path, notice that it is relativepath for the gstore root path.
相关文章