Re: backup script error with could not connect to database

Pepe TD Vo <[email protected]> Fri, 20 Dec 2019 13:13:49 +0000 (UTC)
Newsgroups gmane.comp.db.postgresql.admin
Message-ID <[email protected]>
------=_Part_1149045_657114227.1576847629632
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

the script worked for my single node postgres database server with the firs=
t line in pg_hba.conf=C2=A0host=C2=A0 all=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 indent

not work at all on the replication servers.=C2=A0 I tried to resolve it for=
 two days and finally, I put "trust" on the 1st line, the script works.

Bach-Nga

No one in this world is pure and perfect.=C2=A0 If you avoid people for the=
ir mistakes you will be alone. So judge less, love and forgive more.To call=
 him a dog hardly seems to do him justice though in as much as he had four =
legs, a tail, and barked, I admit he was, to all outward appearances. But t=
o those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely =
rich *** Faithful talent *** Sharing success=20

    On Friday, December 20, 2019, 04:59:27 AM EST, Ekaterina Amez <ekaterin=
[email protected]> wrote: =20
=20
 =20

=20
 El 19/12/19 a las 17:44, Pepe TD Vo escribi=C3=B3:
 =20
=20
  I made it work.=C2=A0 I changed all in pg_hba.conf to trust and backup sc=
ripts run fine.
   =20
When Postgres searches for the matching line in pg_hba.conf, the first line=
 that matches current connection wins. This means that if you have:
=20
=C2=A0=C2=A0=C2=A0 host=C2=A0 all=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 indent
=20
=C2=A0=C2=A0=C2=A0 host=C2=A0 replication=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 127.0.0.1/32=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 trust
=20
The first line wins and indent is applied instead of trust.

 =20

=20
=20
   thank you so much.=20
    Bach-Nga
=20
 No one in this world is pure and perfect.=C2=A0 If you avoid people for th=
eir mistakes you will be alone. So judge less, love and forgive more. To ca=
ll him a dog hardly seems to do him justice though in as much as he had fou=
r legs, a tail, and barked, I admit he was, to all outward appearances. But=
 to those who knew him well, he was a perfect gentleman (Hermione Gingold)=
=20
 **Live simply **Love generously **Care deeply **Speak kindly. *** Genuinel=
y rich *** Faithful talent *** Sharing success  =20
 =20
      On Thursday, December 19, 2019, 07:12:54 AM EST, bw <[email protected]=
m> wrote: =20
 =20
   Did you try
=20
 root su -c postgres pg_dumpall > postgresdump.sql
=20
 On Wed, 18 Dec 2019 at 19:55, Pepe TD Vo <[email protected]> wrote:
 >
 > hello expert,
 >
 > I had to do a backup on replication master-slave servers.=C2=A0 I also h=
ave asked this question before, but=C2=A0 I don't understand why I followed=
 the information and same scripting to run on the replication servers and d=
idn't work.=C2=A0 I can run pg_dumpall successful but not with the script.=
=C2=A0 Would you please tell me what's wrong and what need to correct the e=
rror?
 >
 > my replication server (master) pg_hba.conf
 >
 > # "local" is for Unix domain socket connections only
 > local=C2=A0 all=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 peer
 > host=C2=A0 all=C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 192.168.2.0/24=C2=A0 =C2=A0 =C2=A0 =C2=A0 trus=
t
 > # IPv4 local connections:
 > host=C2=A0 all=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 indent
 > local=C2=A0 all=C2=A0 postgres=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 trust
 > host=C2=A0 all=C2=A0 power_user=C2=A0 =C2=A0 =C2=A0 =C2=A0 0.0.0.0/0=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 md5
 > host=C2=A0 all=C2=A0 other_user=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0.0.0.=
0/0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 md5
 > host=C2=A0 all=C2=A0 storageLoader=C2=A0 =C2=A0 0.0.0.0/0=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 md5
 > # IPv6 local connections:
 > host=C2=A0 all=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ::1/128=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 indent
 > #allow replication connections from localhost, by a user with the replic=
ation priviledge
 > local=C2=A0 replication=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 trust
 > host=C2=A0 replication=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 trust
 > host=C2=A0 replicaiton=C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 ::1/128=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 trust
 > host=C2=A0 replication=C2=A0 replicauser=C2=A0 =C2=A0 masterIP/32=C2=A0 =
trust
 > host=C2=A0 replicaiton=C2=A0 replicauser=C2=A0 =C2=A0 slaveIP/32=C2=A0 =
=C2=A0 trust
 >
 > from the postgres prompt I can connect to each database
 >
 > #psql -d template0 -U postgres
 > template0-#
 > #psql -d template1 -U postgres
 > template1-#
 >
 > #psql -d pscidr -U postgres
 > pscidr-#
 > #psql -d postgres -U postgres
 > postgres-#
 >
 >
 > when I run the script as postgres os, I don't see the error but the only=
 global.sql backup but nothing in it, 0 byte (blank) sql script.
 >
 > when I run as root su -c postgres /path/pg_backup.sh > pgbackup.log, I g=
et below:
 >
 > Performing globals backup:
 > Globals backup
 > pg_dumpall: could not connect to database "template1":FATAL: Ident authe=
ntication failed for user "postgres" fro globals backup.
 >
 > Performing schema-only backup:
 > psql:FATAL: Ident authentication failed for user "postgres"
 > the following databases were matched for schema-only backup:
 >
 > performing full backup:
 > psql:FATAL: Ident authentication failed for user "postgres"
 >
 >
 > I can run pg_dumpall > postgresdump.sql as postgres user os fine will al=
l the databases backup
 >
 > pg_backup.sh and pg_backup.config attachment.
 >
 > v/r,
 >
 > Bach-Nga
 >
 > No one in this world is pure and perfect.=C2=A0 If you avoid people for =
their mistakes you will be alone. So judge less, love and forgive more.
 > To call him a dog hardly seems to do him justice though in as much as he=
 had four legs, a tail, and barked, I admit he was, to all outward appearan=
ces. But to those who knew him well, he was a perfect gentleman (Hermione G=
ingold)
 >
 > **Live simply **Love generously **Care deeply **Speak kindly.
 > *** Genuinely rich *** Faithful talent *** Sharing success
=20
     =20
  =20
------=_Part_1149045_657114227.1576847629632
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div class=3D"ydpde79e3e9yahoo-style-wrap" style=
=3D"font-family:verdana, helvetica, sans-serif;font-size:16px;"><div><div d=
ir=3D"ltr" data-setdir=3D"false">the script worked for my single node postg=
res database server with the first line in pg_hba.conf&nbsp;</div><div dir=
=3D"ltr" data-setdir=3D"false"><span><span style=3D"font-family: Helvetica =
Neue, Helvetica, Arial, sans-serif;">host&nbsp; all&nbsp; all&nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 127.0.0.1/32=
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; indent</span></span><br></div><div><br><=
/div><div dir=3D"ltr" data-setdir=3D"false">not work at all on the replicat=
ion servers.&nbsp; I tried to resolve it for two days and finally, I put "t=
rust" on the 1st line, the script works.</div><div dir=3D"ltr" data-setdir=
=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div =
class=3D"ydpde79e3e9signature"><div id=3D"ydpde79e3e9yui_3_13_0_rc_1_1_1381=
789421038_7868" class=3D"ydpde79e3e9yiv3811552299ms__id13889"><font color=
=3D"#0000ff"><b><span class=3D"ydpde79e3e9yiv3811552299sg"><font color=3D"#=
8000ff" style=3D"background-color: inherit;"></font></span></b></font><div =
id=3D"ydpde79e3e9yui_3_13_0_rc_1_1_1381789421038_7874" class=3D"ydpde79e3e9=
yiv3811552299ms__id13893"><font id=3D"ydpde79e3e9yui_3_13_0_rc_1_1_13817894=
21038_7873" color=3D"#0000ff"><font color=3D"#8000ff"></font><span id=3D"yd=
pde79e3e9yui_3_13_0_rc_1_1_1381789421038_7871" class=3D"ydpde79e3e9yiv38115=
52299sg"><font id=3D"ydpde79e3e9yui_3_13_0_rc_1_1_1381789421038_7870" color=
=3D"#8000ff" style=3D"background-color: inherit;"><b id=3D"ydpde79e3e9yui_3=
_13_0_rc_1_16_1381789421038_18">Bach-Nga<br clear=3D"none"><br clear=3D"non=
e"></b>No one in this world is pure and perfect.&nbsp; If you avoid people =
for their mistakes you will be alone. So judge less, love and forgive more.=
</font></span></font></div><div id=3D"ydpde79e3e9yui_3_13_0_rc_1_1_13817894=
21038_7874" class=3D"ydpde79e3e9yiv3811552299ms__id13893"><font color=3D"#0=
000ff"><span class=3D"ydpde79e3e9yiv3811552299sg"><font color=3D"#8000ff" s=
tyle=3D"background-color: inherit;">To call him a dog hardly seems to do hi=
m justice though in as much as he had four legs, a tail, and barked, I admi=
t he was, to all outward appearances. But to those who knew him well, he wa=
s a perfect gentleman (Hermione Gingold)</font></span></font></div><br clea=
r=3D"none"><span style=3D"color:rgb(128, 0, 255);" id=3D"ydpde79e3e9yui_3_1=
3_0_rc_1_1_1381789421038_7867">**Live simply **Love generously **Care deepl=
y **Speak kindly.</span></div><div id=3D"ydpde79e3e9yui_3_13_0_rc_1_1_13817=
89421038_7866" class=3D"ydpde79e3e9yiv3811552299ms__id13894"><span id=3D"yd=
pde79e3e9yui_3_13_0_rc_1_1_1381789421038_7865" class=3D"ydpde79e3e9yiv38115=
52299sg"><font id=3D"ydpde79e3e9yui_3_13_0_rc_1_1_1381789421038_7864" color=
=3D"#8000ff" style=3D"background-color: inherit;">*** Genuinely rich *** Fa=
ithful talent *** Sharing success</font></span></div></div></div>
        <div><br></div><div><br></div>
       =20
        </div><div id=3D"yahoo_quoted_7705096325" class=3D"yahoo_quoted">
            <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
               =20
                <div>
                    On Friday, December 20, 2019, 04:59:27 AM EST, Ekaterin=
a Amez &lt;[email protected]&gt; wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id=3D"yiv5255759050"><div>
    <p><br clear=3D"none">
    </p>
    <div class=3D"yiv5255759050moz-cite-prefix">El 19/12/19 a las 17:44, Pe=
pe TD Vo
      escribi=C3=B3:<br clear=3D"none">
    </div>
    <blockquote type=3D"cite">
      </blockquote></div><div><div class=3D"yiv5255759050ydp69f78c4ayahoo-s=
tyle-wrap" style=3D"font-family:verdana, helvetica, sans-serif;font-size:16=
px;">
        <div>
          <div dir=3D"ltr"><span><span style=3D"color:rgb(0, 0, 0);font-fam=
ily:verdana, helvetica, sans-serif;font-size:16px;">I made it work.&nbsp; I=
 changed
                all in pg_hba.conf to trust and backup scripts run fine.</s=
pan></span><br clear=3D"none">
          </div>
        </div>
      </div>
   =20
    <p>When Postgres searches for the matching line in pg_hba.conf, the
      first line that matches current connection wins. This means that
      if you have:</p>
    <p>&nbsp;&nbsp;&nbsp; host&nbsp; all&nbsp; all&nbsp; &nbsp; &nbsp; &nbs=
p; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 127.0.0.1/32&nbsp; &nbs=
p; &nbsp; &nbsp; &nbsp;
      indent</p>
    <p>&nbsp;&nbsp;&nbsp; host&nbsp; replication&nbsp; all&nbsp; &nbsp; &nb=
sp; &nbsp; 127.0.0.1/32&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trust</p>
    <p>The first line wins and indent is applied instead of trust.</p><div =
class=3D"yiv5255759050yqt6072732062" id=3D"yiv5255759050yqtfd13651"><br cle=
ar=3D"none">
    </div><div class=3D"yiv5255759050yqt6072732062" id=3D"yiv5255759050yqtf=
d61567">
    <p><br clear=3D"none">
    </p>
    <blockquote type=3D"cite">
      <div class=3D"yiv5255759050ydp69f78c4ayahoo-style-wrap" style=3D"font=
-family:verdana, helvetica, sans-serif;font-size:16px;">
        <div>
          <div dir=3D"ltr"><span><span style=3D"color:rgb(0, 0, 0);font-fam=
ily:verdana, helvetica, sans-serif;font-size:16px;">thank you so much.</spa=
n></span></div>
          <div><br clear=3D"none">
          </div>
          <div class=3D"yiv5255759050ydp69f78c4asignature">
            <div class=3D"yiv5255759050ydp69f78c4ayiv3811552299ms__id13889"=
 id=3D"yiv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789421038_7868"><font =
color=3D"#0000ff"><b><span class=3D"yiv5255759050ydp69f78c4ayiv3811552299sg=
"></span></b></font>
              <div class=3D"yiv5255759050ydp69f78c4ayiv3811552299ms__id1389=
3" id=3D"yiv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789421038_7874"><fon=
t id=3D"yiv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789421038_7873" color=
=3D"#0000ff"><span class=3D"yiv5255759050ydp69f78c4ayiv3811552299sg" id=3D"=
yiv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789421038_7871"><font id=3D"y=
iv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789421038_7870" style=3D"backg=
round-color:inherit;" color=3D"#8000ff"><b id=3D"yiv5255759050ydp69f78c4ayu=
i_3_13_0_rc_1_16_1381789421038_18">Bach-Nga<br clear=3D"none">
                        <br clear=3D"none">
                      </b>No one in this world is pure and perfect.&nbsp; I=
f
                      you avoid people for their mistakes you will be
                      alone. So judge less, love and forgive more.</font></=
span></font></div>
              <div class=3D"yiv5255759050ydp69f78c4ayiv3811552299ms__id1389=
3" id=3D"yiv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789421038_7874"><fon=
t color=3D"#0000ff"><span class=3D"yiv5255759050ydp69f78c4ayiv3811552299sg"=
><font style=3D"background-color:inherit;" color=3D"#8000ff">To
                      call him a dog hardly seems to do him justice
                      though in as much as he had four legs, a tail, and
                      barked, I admit he was, to all outward
                      appearances. But to those who knew him well, he
                      was a perfect gentleman (Hermione Gingold)</font></sp=
an></font></div>
              <br clear=3D"none">
              <span id=3D"yiv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789=
421038_7867" style=3D"color:rgb(128, 0, 255);">**Live
                simply **Love generously **Care deeply **Speak kindly.</spa=
n></div>
            <div class=3D"yiv5255759050ydp69f78c4ayiv3811552299ms__id13894"=
 id=3D"yiv5255759050ydp69f78c4ayui_3_13_0_rc_1_1_1381789421038_7866"><span =
class=3D"yiv5255759050ydp69f78c4ayiv3811552299sg" id=3D"yiv5255759050ydp69f=
78c4ayui_3_13_0_rc_1_1_1381789421038_7865"><font id=3D"yiv5255759050ydp69f7=
8c4ayui_3_13_0_rc_1_1_1381789421038_7864" style=3D"background-color:inherit=
;" color=3D"#8000ff">***
                  Genuinely rich *** Faithful talent *** Sharing success</f=
ont></span></div>
          </div>
        </div>
        <div><br clear=3D"none">
        </div>
        <div><br clear=3D"none">
        </div>
      </div>
      <div class=3D"yiv5255759050yahoo_quoted" id=3D"yiv5255759050yahoo_quo=
ted_7210724997">
        <div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, sans-=
serif;font-size:13px;color:#26282a;">
          <div> On Thursday, December 19, 2019, 07:12:54 AM EST, bw
            <a rel=3D"nofollow" shape=3D"rect" class=3D"yiv5255759050moz-tx=
t-link-rfc2396E" ymailto=3D"mailto:[email protected]" target=3D"_blank" hre=
f=3D"mailto:[email protected]">&lt;[email protected]&gt;</a> wrote: </div>
          <div><br clear=3D"none">
          </div>
          <div><br clear=3D"none">
          </div>
          <div>
            <div dir=3D"ltr">Did you try<br clear=3D"none">
              <br clear=3D"none">
              root su -c postgres pg_dumpall &gt; postgresdump.sql<br clear=
=3D"none">
              <div class=3D"yiv5255759050yqt5894315542" id=3D"yiv5255759050=
yqtfd56431"><br clear=3D"none">
                On Wed, 18 Dec 2019 at 19:55, Pepe TD Vo &lt;<a rel=3D"nofo=
llow" shape=3D"rect" ymailto=3D"mailto:[email protected]" target=3D"_blank" =
href=3D"mailto:[email protected]">[email protected]</a>&gt;
                wrote:<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; hello expert,<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; I had to do a backup on replication master-slave
                servers.&nbsp; I also have asked this question before, but&=
nbsp; I
                don't understand why I followed the information and same
                scripting to run on the replication servers and didn't
                work.&nbsp; I can run pg_dumpall successful but not with th=
e
                script.&nbsp; Would you please tell me what's wrong and wha=
t
                need to correct the error?<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; my replication server (master) pg_hba.conf<br clear=3D=
"none">
                &gt;<br clear=3D"none">
                &gt; # "local" is for Unix domain socket connections
                only<br clear=3D"none">
                &gt; local&nbsp; all&nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=
 &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pee=
r<br clear=3D"none">
                &gt; host&nbsp; all&nbsp; &nbsp; all&nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 192.168.2.0/24&nbsp;
                &nbsp; &nbsp; &nbsp; trust<br clear=3D"none">
                &gt; # IPv4 local connections:<br clear=3D"none">
                &gt; host&nbsp; all&nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 127.0.0.1/32&nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; indent<br clear=3D"none">
                &gt; local&nbsp; all&nbsp; postgres&nbsp; &nbsp; &nbsp; &nb=
sp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trust<br clear=3D=
"none">
                &gt; host&nbsp; all&nbsp; power_user&nbsp; &nbsp; &nbsp; &n=
bsp; 0.0.0.0/0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                md5<br clear=3D"none">
                &gt; host&nbsp; all&nbsp; other_user&nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; 0.0.0.0/0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; md5<br clear=3D"none">
                &gt; host&nbsp; all&nbsp; storageLoader&nbsp; &nbsp; 0.0.0.=
0/0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; md5<br clear=3D"none">
                &gt; # IPv6 local connections:<br clear=3D"none">
                &gt; host&nbsp; all&nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ::1/128&nbsp; &nbsp; =
&nbsp;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; indent<br clear=
=3D"none">
                &gt; #allow replication connections from localhost, by a
                user with the replication priviledge<br clear=3D"none">
                &gt; local&nbsp; replication&nbsp; all&nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
;
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trust<br clear=3D=
"none">
                &gt; host&nbsp; replication&nbsp; all&nbsp; &nbsp; &nbsp; &=
nbsp; 127.0.0.1/32&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                trust<br clear=3D"none">
                &gt; host&nbsp; replicaiton&nbsp; all&nbsp; &nbsp; &nbsp; &=
nbsp; ::1/128&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                &nbsp; &nbsp; &nbsp; trust<br clear=3D"none">
                &gt; host&nbsp; replication&nbsp; replicauser&nbsp; &nbsp; =
masterIP/32&nbsp;
                trust<br clear=3D"none">
                &gt; host&nbsp; replicaiton&nbsp; replicauser&nbsp; &nbsp; =
slaveIP/32&nbsp; &nbsp;
                trust<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; from the postgres prompt I can connect to each
                database<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; #psql -d template0 -U postgres<br clear=3D"none">
                &gt; template0-#<br clear=3D"none">
                &gt; #psql -d template1 -U postgres<br clear=3D"none">
                &gt; template1-#<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; #psql -d pscidr -U postgres<br clear=3D"none">
                &gt; pscidr-#<br clear=3D"none">
                &gt; #psql -d postgres -U postgres<br clear=3D"none">
                &gt; postgres-#<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; when I run the script as postgres os, I don't see
                the error but the only global.sql backup but nothing in
                it, 0 byte (blank) sql script.<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; when I run as root su -c postgres
                /path/pg_backup.sh &gt; pgbackup.log, I get below:<br clear=
=3D"none">
                &gt;<br clear=3D"none">
                &gt; Performing globals backup:<br clear=3D"none">
                &gt; Globals backup<br clear=3D"none">
                &gt; pg_dumpall: could not connect to database
                "template1":FATAL: Ident authentication failed for user
                "postgres" fro globals backup.<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; Performing schema-only backup:<br clear=3D"none">
                &gt; psql:FATAL: Ident authentication failed for user
                "postgres"<br clear=3D"none">
                &gt; the following databases were matched for
                schema-only backup:<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; performing full backup:<br clear=3D"none">
                &gt; psql:FATAL: Ident authentication failed for user
                "postgres"<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; I can run pg_dumpall &gt; postgresdump.sql as
                postgres user os fine will all the databases backup<br clea=
r=3D"none">
                &gt;<br clear=3D"none">
                &gt; pg_backup.sh and pg_backup.config attachment.<br clear=
=3D"none">
                &gt;<br clear=3D"none">
                &gt; v/r,<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; Bach-Nga<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; No one in this world is pure and perfect.&nbsp; If you
                avoid people for their mistakes you will be alone. So
                judge less, love and forgive more.<br clear=3D"none">
                &gt; To call him a dog hardly seems to do him justice
                though in as much as he had four legs, a tail, and
                barked, I admit he was, to all outward appearances. But
                to those who knew him well, he was a perfect gentleman
                (Hermione Gingold)<br clear=3D"none">
                &gt;<br clear=3D"none">
                &gt; **Live simply **Love generously **Care deeply
                **Speak kindly.<br clear=3D"none">
                &gt; *** Genuinely rich *** Faithful talent *** Sharing
                success<br clear=3D"none">
                <br clear=3D"none">
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </div></div></div></div>
            </div>
        </div></body></html>
------=_Part_1149045_657114227.1576847629632--