set path D:\DB\PostgreSQL\16\bin connect to database –h is host name -p is port number -d is database name -U is for user name psql -h localhost -p 5432 -d postgres -U postgres export dump file 參考 pg_dump -h 192.168.1.1 -U uesername dbname > dbname.pgsql