“permission denied” for pg_dump output file

前端 未结 3 1700
南旧
南旧 2021-02-13 22:05

i used below command to backup my database

sudo -u user_name pg_dump dbName -f /home ..../someWhere/db.sql

but it gives me this :

pg_

3条回答
  •  猫巷女王i
    2021-02-13 22:12

    try pg_dump from psql command-line as below:

    postgres=# \! pg_dump dbName -f /home ..../someWhere/db.sql
    

提交回复
热议问题