openGauss这么多工具?到底要选哪个?(239)

39 阅读1分钟

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/

  • -s, --schema-only

    只导入模式(数据定义),不导入数据(表内容)。当前的序列值也不会导入。

  • -S, --sysadmin=NAME

    该参数为扩展预留接口,不建议使用。

  • -t, --table=NAME

    只导入已列举的表定义、数据或定义和数据。该选项与-n选项同时使用时,用来指定某个模式下的表对象。-n参数不输入时,默认为PUBLIC模式。多次输入-n -t 可以导入指定模式下的多个表。

    例如:

    导入PUBLIC模式下的table1

    gs_restore -h host_name -p port_number -d postgres -t table1 backup/MPPDB_backup.tar
    

    导入test1模式下的test1和test2模式下test2

    gs_restore -h host_name -p port_number -d postgres -n test1 -t test1 -n test2 -t test2 backup/MPPDB_backup.tar
    

    导入PUBLIC模式下的table1和test1 模式下table1

    gs_restore -h host_name -p port_number -d postgres -n PUBLIC -t table1 -n test1 -t table1 backup/MPPDB_backup.tar
    

    说明:

    -t不支持schema_name.table_name的输入格式,指定此格式不会报错,但不会生效。

#openGauss #入门 #安装 #数据库 #开源

知识来源:docs-opengauss.osinfra.cn/zh/