postgresqlpg-dumppg-dumpall

pg_dumpall > alldb.sql output bash: alldb.sql: Permission denied


Im trying to take all backup by running these as superuser i.e postgres but

pg_dumpall > alldb.sql

bash: alldb.sql: Permission denied

pg_dumpall works but give backup as text in terminal

made changes in pg_hba.conf

pg_hba.conf


Solution

  • This has nothing to do with pg_dumpall or pg_hba. It is just the shell complaining that it cannot write to the current directory. Try another directory to put your file into, for example:

     pg_dumpall > /tmp/alldb.sql