示例五:执行gs_dump,同时导出两个表hr.staffs和hr.employments,导出文件格式为文本格式。
gs_dump -f /home/gbase/backup/MPPDB_table_backup1.sql -p 5600 human_resource -t hr.staffs -t hr.employments -F p
Password:
gs_dump[port='5600'][human_resource][2017-07-21 17:19:42]: dump database human_resource successfully
gs_dump[port='5600'][human_resource][2017-07-21 17:19:42]: total time: 2414 ms
示例六:执行gs_dump,导出时,排除两个表hr.staffs和hr.employments,导出文件格式为文本格式。
gs_dump -f /home/gbase/backup/MPPDB_table_backup2.sql -p 5600 human_resource -T hr.staffs -T hr.employments -F p
Password:
gs_dump[port='5600'][human_resource][2017-07-21 17:21:02]: dump database human_resource successfully
gs_dump[port='5600'][human_resource][2017-07-21 17:21:02]: total time: 3165 ms
示例七:执行gs_dump,导出表hr.staffs的定义和数据,只导出表hr.employments的定义,导出文件格式为tar归档格式。
gs_dump -f /home/gbase/backup/MPPDB_table_backup3.tar -p 5600 human_resource -t hr.staffs -t hr.employments --exclude-table-data hr.employments -F t
Password:
gs_dump[port='5600'][human_resource][2018-11-14 11:32:02]: dump database human_resource successfully
gs_dump[port='5600'][human_resource][2018-11-14 11:32:02]: total time: 1645 ms
示例八:执行gs_dump,导出表hr.staffs的定义和数据,并对导出文件进行加密,导出文件格式为文本格式。
gs_dump -f /home/gbase/backup/MPPDB_table_backup4.sql -p 5600 human_resource -t hr.staffs --with- encryption AES128 --with-key abcdefg_?1234567 -F p
Password:
gs_dump[port='5600'][human_resource][2018-11-14 11:35:30]: dump database human_resource successfully
gs_dump[port='5600'][human_resource][2018-11-14 11:35:30]: total time: 6708 ms