0

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.
3
  • Can you connect with that user and password ? Commented Sep 15, 2015 at 12:33
  • yes i can connect the database using php with my application but i would export it ?? Commented Sep 15, 2015 at 12:45
  • Answer below - I was reading the wrong permission into the message Commented Sep 15, 2015 at 16:52

1 Answer 1

2

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"
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.