How to pass in password to pg_dump?

后端 未结 16 837
深忆病人
深忆病人 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:34

    Another (probably not secure) way to pass password is using input redirection i.e. calling

    pg_dump [params] < [path to file containing password]

提交回复
热议问题