我如何从postgres备份数据库?

时间:2015-09-15 12:30:16

标签: postgresql pg-dump

我正在尝试从Postgres备份数据库,但是:

C:/Program Files (x86)/PostgreSQL/9.3/bin\pg_dump.exe --host localhost --port 5432 --username "postgres" --no-password  --format custom --blobs --verbose --file "projet" "postgis_21_sample"
    pg_dump: [custom archiver] could not open output file "projet": Permission denied

    Process returned exit code 1.

1 个答案:

答案 0 :(得分:2)

您正在尝试将备份文件写入C:/Program Files (x86)/PostgreSQL/9.3/bin,这对于普通用户来说是不可写的(这是有充分理由的)。

您需要提供一个可供当前用户使用的文件位置,例如:

--file "c:/Users/sara/projet"
相关问题