- pg_dump导入导出
## 导出
# pg_dump -h <hostname> -p <port> -U <username> -s <database_name> > <file_name>
pg_dump -h localhost -p 5432 -U postgres -s mydatabase > mydatabase_schema.sql
## 导入
# psql -h <hostname> -p <port> -U <username> <database_name> < <file_name>
psql -h localhost -p 5432 -U postgres mydatabase_new < mydatabase_schema.sql
标签:5432,psql,常用,postgres,dump,mydatabase,PostgrepSQL,pg,小记
From: https://www.cnblogs.com/DeepInThought/p/17286330.html