GBase 8a数据库集群,提供了gcdump工具,将数据库、表、存储过程等的结构导出,以便用户重复使用。
1.作用
导出建表语句,多用于库结构的恢复或新集群的初始化等。
2. 使用方法
/opt/gcluster/server/bin/gcdump –routines=true -B testdb
其中 –routines=true是导出存储过程和自定义函数
-B 指定数据库。
默认导出脚本里包含了drop database和create database信息,请一定注意,避免表数据被误删除。
-n 不输出create database命令
-t 不输出create table 命令
3. 使用样例
