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
@Josue Alexander Ibarra answer works on centos 7 and version 9.5 if --dbname is not passed.
pg_dump postgresql://username:password@127.0.0.1:5432/mydatabase