[ale] Postgreq backup help

Beddingfield, Allen allen at ua.edu
Mon Sep 28 11:00:27 EDT 2015


Aha!  That got it.  I put a "*" in the database name field of the .pgpass file, and the pg_dumpall works as expected.

Thanks!
Allen B.

--
Allen Beddingfield
Systems Engineer
The University of Alabama
________________________________
From: ale-bounces at ale.org [ale-bounces at ale.org] on behalf of James Sumners [james.sumners at gmail.com]
Sent: Monday, September 28, 2015 9:46 AM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Postgreq backup help


On Mon, Sep 28, 2015 at 10:35 AM, Beddingfield, Allen <allen at ua.edu<mailto:allen at ua.edu>> wrote:
Okay, so I've gotten the .pgpass to work without any issue.
The file is in ~/.pgpass, with permissions of 600

The file looks like:
<hostname>.ua.edu:5432<http://ua.edu:5432>:<dbname>:<user>:<password>

I can do:
pg_dump -h <hostname>.ua.edu<http://ua.edu> -d <dbname> -U <user> -w

This works, dumping out that database, without prompting for a password.

I want to be able to do pg_dumpall (I want a one file backup to re-add users, databases, grants, etc...) - similar to a MySQL --all-databases backup.

When I try:
pg_dumpall -h <hostname>.ua.edu<http://ua.edu> -U <user> -w

I get:
pg_dumpall: could not connect to database "template1": fe_sendauth: no password supplied

Any ideas?

Wildcards work in pretty much any field. So put a '*' in the database field.


--
James Sumners
http://james.sumners.info/ (technical profile)
http://jrfom.com/ (personal site)
http://haplo.bandcamp.com/ (band page)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20150928/2266eb29/attachment.html>


More information about the Ale mailing list