DEV Community

leo
leo

Posted on

openGauss:gs_dump

gs_dump
Background Information
gs_dump is a tool used by openGauss to export database-related information. Users can customize the export of a database or its objects (schemas, tables, views, etc.), except for recycle bin objects. The database that supports export can be the default database postgres or a custom database.

The gs_dump utility is executed by the operating system user omm.

When the gs_dump tool is exporting data, other users can access the openGauss database (read or write).

The gs_dump tool supports exporting complete and consistent data. For example, start gs_dump at time T1 to export database A, then the exported data result will be the data state of database A at time T1, and the modification to database A after time T1 will not be exported.

Generated columns will not be dumped during gs_dump.

gs_dump supports exporting text format files compatible with v1 database.

gs_dump supports exporting database information to SQL script files or other archive files in plain text format.

SQL script file in plain text format: Contains the SQL statements required to restore the database to its saved state. Run the SQL script file through gsql to restore the database. Even on other hosts and other database products, as long as the SQL script file is slightly modified, it can also be used to rebuild the database.
Archive format file: contains the data required to restore the database to its saved state, which can be in tar format, directory archive format or custom archive format, see Table 1 for details. The export result must be used in conjunction with gs_restore to restore the database. When the gs_restore tool is imported, the system allows the user to select the content to be imported, and even sort the content waiting to be imported before importing.

Top comments (0)