Or using a pgpass dotfile in the backup user's home directory. chmod appropriately. <span></span><br><br>On Wednesday, September 23, 2015, Robert Slaughter <<a href="mailto:robert.s.slaughter@gmail.com">robert.s.slaughter@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can avoid password prompting by setting the PGPASS environment variable to point to an appropriate file. Google for details I can't recall.</div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>----</div><div>Bob Slaughter</div><div><a href="http://www.facebook.com/robert.s.slaughter" target="_blank">http://www.facebook.com/robert.s.slaughter</a> </div><div>"The price good men pay for indifference to public affairs is to be ruled by evil men." -- Plato</div><div>"All that is necessary for the triumph of evil is that good men do nothing." -- Edmund Burke</div><div>"The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing." -- Albert Einstein</div><div>"Nothing emboldens the wicked so greatly as the lack of courage on the part of the good." -- Pope Leo XIII, encyclical 'On Christians as Citizens'</div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Sep 23, 2015 at 5:17 PM, Beddingfield, Allen <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','allen@ua.edu');" target="_blank">allen@ua.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So, after 20 years of being a Unix/Linux admin, I've finally got a situation where I need to setup a Postgres server (aside from a few provided-with-the-product cases). Anyway, I've got it all up and running with no issue, but I'm struggling with the best way to do a remote backup of the whole server.<br>
In MySQL/MariaDB, I do:<br>
<br>
"mysqldump --host=servername.domain -u username --password "plain text pw" --all-databases > filename.sql"<br>
<br>
I need an equivalent for Postgres. I've discovered that I can do "pg_dump -h servername.domain -U username -W databasename", that I'm prompted for the password, and it will dump out that database.<br>
<br>
I've been experimenting with pg_dumpall, but it dumps a portion, prompts for the password, etc...<br>
<br>
Suggestions/options here?<br>
I have a script I use for MariaDB that dumps out an -all-databases backup, with a date-based naming convention, then handles a 30 day rotation of the backups. I just want to plug in some pg_dump pg_dumpall into there and do the same. I would prefer a full server backup that will capture users, grants, etc... so that I can put the entire server back from one backup.<br>
<br>
Thanks.<br>
Allen B.<br>
<br>
--<br>
Allen Beddingfield<br>
Systems Engineer<br>
The University of Alabama<br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','Ale@ale.org');" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div><br></div>
</blockquote><br><br>-- <br><div dir="ltr"><div><div dir="ltr"><div>James Sumners<br><a href="http://james.sumners.info/" target="_blank">http://james.sumners.info/</a> (technical profile)</div><div><a href="http://jrfom.com/" target="_blank">http://jrfom.com/</a> (personal site)</div><div><a href="http://haplo.bandcamp.com/" target="_blank">http://haplo.bandcamp.com/</a> (band page)</div></div></div></div><br>