pgsql备份和恢复数据 备份数据恢复数据 备份数据 pg_dump -h 127.0.0.1 -p 5432 -U pgsql -W -d test -F c -f test.dump # -h: ip地址 # -p: 端口号 # -U: 数据库用户 # -d: 要备份的数据库名称 # -f: 备份出文件名 恢复数据 pg_restore -U pgsql -d test test.dump