Export command
- - 5432 - -- inserts-t human_info > D:\human_info_backup.sql testdb
Command description
Pg_dump: is the backup command that comes with the PG database, and in the bin directory, all execution must be performed in the bin directory.
- H: Specify the host address, which is the server of the PG database, the host address specified here is localhost
- P: Specify the host port, is the port of the PG database application, the default port is used here, the default seems to be without writing.
- u: Specifies the user name, which is the user name of the login database, the default user name of PG Postgres
--inserts: This parameter specifies that the exported result is an INSERT statement of the SQL file, but without a field INSERT statement, if you want to bring a field can be written--column-inserts
- T: Specifies the name of the table to export, where the HUMAN_INFO table structure and data are exported
> D:\human_info_backup.sql This statement specifies the path and file name to export
Finally, specify the name of the DB instance to export TestDB
PG database table interface and data export