pg_dump: [archiver] could not open output file: Permission denied

Following error occurs when try to take backup of database to the file system. But, the user(superuser) does not have permission to backup location.

pg_dump: [archiver] could not open output file "bank_20170531.sql": Permission denied.

Backup Command tried to run:

pg_dump -U postgres bank -f /home/vijay/dumps/bank_20170531.sql

Resolution: Change permission of directory /home/vijay/dumps/ to user postgres.

chown -R postgres:postgres /home/vijay/dumps/

Related Posts

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by k2schools
%d bloggers like this: