0
votes

I'm trying to back up the database from Postgres but:

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
Can you connect with that user and password ? - LenW
yes i can connect the database using php with my application but i would export it ?? - sara
Answer below - I was reading the wrong permission into the message - LenW

1 Answers

2
votes

You are trying to write the backup file to C:/Program Files (x86)/PostgreSQL/9.3/bin which is not writable for regular users (for a good reason).

You need to supply a file location that is writable for your current user, e.g.

--file "c:/Users/sara/projet"