📅  最后修改于: 2022-03-11 15:05:21.634000             🧑  作者: Mango
# set the password in an environment variable
export PGPASSWORD=mypassword # linux/mac
set PGPASSWORD=mypassword # windows
# create the database dump
$ pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump