How to pass in password to pg_dump?

后端 未结 16 835
深忆病人
深忆病人 2020-11-28 00:58

I\'m trying to create a cronjob to back up my database every night before something catastrophic happens. It looks like this command should meet my needs:

0          


        
16条回答
  •  爱一瞬间的悲伤
    2020-11-28 01:29

    As detailed in this blog post , there are two ways to non interactively provide a password to PostgreSQL utilities such as the "pg_dump" command: using the ".pgpass" file or using the "PGPASSWORD" environment variable.

提交回复
热议问题