Updated on 2025-04-14 GMT+08:00

Overview

Table 1 Overview

Tool

Description

COPY

Syntax for importing and exporting database data in batches. COPY can be used to import and export table-level data and export query result sets. For details about the best practices for COPY, see "Best Practices > Best Practices for COPY Import and Export" in Developer Guide. For details about all COPY commands, see "SQL Reference > SQL Syntax > C > COPY" in Developer Guide.

\COPY

Meta-command for importing and exporting table-level data in batches on the gsql client. Compared with the COPY command, the \COPY meta-command can import and export client data files and supports concurrent import through multiple transactions.

gs_loader

Imports table data. gs_loader converts the syntax supported by the control file to the \COPY syntax, uses the existing \COPY function to import data, and records the \COPY result in client logs.

gs_dump

Tool for database-level export. To export information about a single database, you can export the definitions and data of all or some objects (such as schemas, tables, and views) in a database.

gs_dumpall

Tool for instance-level export. You can export object definitions and data of all databases in an instance, including data of the default database, data of user-defined databases, and global objects of all databases. gsql is required for instance-level restoration.

gs_restore

Tool for database-level import. It imports files exported using gs_dump.