Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyhx2-0006Je-Kc for pgsql-admin@arkaria.postgresql.org; Tue, 26 Feb 2019 18:59:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gyhwz-0006sC-F8 for pgsql-admin@arkaria.postgresql.org; Tue, 26 Feb 2019 18:59:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyhwy-0006s4-Kw for pgsql-admin@lists.postgresql.org; Tue, 26 Feb 2019 18:59:33 +0000 Received: from sonic304-11.consmr.mail.bf2.yahoo.com ([74.6.128.34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyhwt-0003tw-Cl for pgsql-admin@lists.postgresql.org; Tue, 26 Feb 2019 18:59:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1551207565; bh=MUj6HlBzbvkEnj+Bl2u+skvuEbNdUk8K5EF47Lz73gQ=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=IUVpu01zFfcstN9svVToEWffkF5TzlTXcHJFeHJ/gcuNNnVU4V3AYBRto6t4LrWR3ytsYARX1uuqW7wy4zCpqmPQelys0bxG1xXlUbCLF9JUYBWGegPr/gTzth3A38hAmKoEvlZKrPm5NM+tozPSj96IHHVD3Z3s+gwG1aZEYSzwDk6+OAOdETl2N5c7rWZLPCi5B2lkjk3/SQUs9qSd6C+haZMGMjJ6f/6nxk5R6byuzBxAbWALs8tnzNp+7ttQg3rhfxGQIzcV/9WdZZGwsSTjLtl930v6mtnoowHVcI8b69Hrnm8R5DBMafigN/k/6cgd431OGDIaH2aDXimXvw== X-YMail-OSG: R59_f28VM1kzgBJEp_gHt1mVLjapJfQhNyDOPE78MYfPfrDtnSDBmkOGm7Z_S2x .5L.ygmy_js50BmVqg94l4yCutywfhikxIKCuX4YXHAnpaOtNdguUhUcfi5IgJK2pLGtnfRASiWC Eyw_SXrGETOo0uZytihLmV2.5fO8GiIEyKiirQhl17iq3WzpGWLze5feFum1s_eQNYgEBDzk8vCS ECMsylp.hhFtfA9dAafYqjbQBRcrcb0q.t3WB5faKLvYdwGIhjTyYxwiRUyiriiEUOYd9p_TO_e8 lwLR_Dv8Kao8rBVQyNBDOv48YBHWcyhwwobVjs0GPCacBoH4zJ1MKzv.dkRlxkrVnMy1R2bNXOs6 vNUMLv0zhPW45x3LIWsFVR4HwpKoBC9eWVMHOuGqulvf16J6YG6lqxYmUsS58jEzs8tpjN8CCBN. xnBIS1VHoeqCrAQ1HYodO4r7t2upsfuzQ62oleIs59c1DaY6EK.QxH5uXPu6mHRlmpnbvJmT8X8B sik1UBiZgXrMFBNkGidpl1pirnOsSiZ5..KbeiljVoY0Hz1DziIrv4jmDV69LOiiGrhzxLDYC2lm Dl3TbfmOQKVcj0tM4oHGVd2dxJWQQVv.ajHU7SD4RTZ4i3GauFitBgMQwA.5_NelanZ7mX3w9NHh QVIJZqtTv0Jl5TXndLZ1I3Au9bSafHF8XPJDBizaWxmWosS1MP4QksmsBdZ97HCQoofRJM4ppZvF ecl49iFP8nsyN25me4Cl0oxUzNCyKS3u0bcd9l8H7lPvRgVDShLZuNQqC0NzhPg2DyACddrlb0Ru R83cwNDKZjdlUiCa.luNv3HP1geE0wiC1srbMRckcfRzOtgfYUFXpY3Y1Br2Pmmutf2E5oacXnej TGQEVYbBkvyfteZvJLWepppeZ5u.ud0u9uOIS6L53qy.4j9hT40UyxzFbZGKBMN92Tixp3VuJ18N qY8ofZWDSgvnPV5Nwrimbtv7tvUZJYQsCn59EIfLgfZLKHvXP.Q0YPXVZxT5X_zLD6wo1PqbOetg eCHSwQ1GaPCUpUqskzZbsEiVGh0iX2Nh26HzGTL9txjMMfHFY5.5.HeBcA3V6M6yyvKgJ Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Tue, 26 Feb 2019 18:59:25 +0000 Date: Tue, 26 Feb 2019 18:59:24 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: Pepe TD Vo , Shreeyansh Dba Cc: "gilberto.castillo@etecsa.cu" , Pgsql-admin Message-ID: <713147705.5704638.1551207564863@mail.yahoo.com> In-Reply-To: <1161831433.5624889.1551203198375@mail.yahoo.com> References: <1766891885.5546566.1551195368839.ref@mail.yahoo.com> <1766891885.5546566.1551195368839@mail.yahoo.com> <1161831433.5624889.1551203198375@mail.yahoo.com> Subject: Re: [MASSMAIL]Re: pg_dumpall: could not connect to database: FATAL MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5704636_1724133509.1551207564839" X-Mailer: WebService/1.1.13123 YahooMailNeo Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36 Content-Length: 142055 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_5704636_1724133509.1551207564839 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I have tried to see the file read from pg_hba.conf and the config file with= in psql #postgres=3D# select pg_read_file('pg_hba.conf'); #TYPE=C2=A0 DATABASE=C2=A0 =C2=A0 =C2=A0USER=C2=A0 =C2=A0 =C2=A0ADDRESS=C2= =A0 =C2=A0 =C2=A0METHOD# "local" is for Unix domain socket connectiosn only local=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0all=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=A0trust # IPv4 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0127.0.0.1/32 trust # IPv6 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0::1/128=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0trust # allow all replication connections from localhost, by a user with the repl= ication privilegelocal=C2=A0 =C2=A0 replication=C2=A0 =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 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 trusthost=C2=A0 =C2=A0 replication=C2=A0 =C2=A0= =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=C2=A0 trusthost= =C2=A0 =C2=A0 replication=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ::1/128=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trust I also found pg_hba.conf on both folders=C2=A0 /var/lib/pgsql/11/data/pg_hb= a.conf & /var/lib/pgsql/data/pg_hba.conf).=C2=A0 I modified it as above and= the script is not working even run from the command prompt. #vi pg_hba.conf ( (from /var/lib/pgsql/11/data/pg_hba.conf & /var/lib/pgsql= /data/pg_hba.conf)=C2=A0 #TYPE=C2=A0 DATABASE=C2=A0 =C2=A0 =C2=A0USER=C2=A0 =C2=A0 =C2=A0ADDRESS=C2= =A0 =C2=A0 =C2=A0METHOD# "local" is for Unix domain socket connectiosn only local=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0all=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=A0trust # IPv4 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0127.0.0.1/32 trust host=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 power= _user 0.0.0.0/0=C2=A0 =C2=A0 =C2=A0md5host=C2=A0 =C2=A0 =C2=A0 all=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 other_user 0.0.0.0/0=C2=A0 =C2=A0 =C2=A0= md5host=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 s= torageLoader 0.0.0.0/0 md5 # IPv6 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0::1/128=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0trust # allow all replication connections from localhost, by a user with the repl= ication privilegelocal=C2=A0 =C2=A0 replication=C2=A0 =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 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 trusthost=C2=A0 =C2=A0 replication=C2=A0 =C2=A0= =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=C2=A0 =C2=A0rust= host=C2=A0 =C2=A0 replication=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ::1/128=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trust (1 row) postgres=3D# select pg_conf_load_time() > modification from pg_stat_file('p= g_hba.conf'):?column?----------f(1 row) Can you tell me what "f" mean?=C2=A0 force?=C2=A0 load time should be by da= te? how come, when I show pg_hba.conf from psql, it didn't give any row return?= =C2=A0Bach-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 Tuesday, February 26, 2019 12:47 PM, Pepe TD Vo w= rote: =20 same error: run as root:# export HOSTNAME=3Dhostname# export USERNAME=3Dpostgres# expor= t DATABASE=3Dpostgres=C2=A0# export PORT 5432# pg_dump -v -p $PORT -U $USER= NAME -d $DATABASE -f /tmp/postgresbakup.sql pg_dump:[archiver (db)]connection to database "DATABASE" failed: could not = connect to server: Connection refusedIs the server running on host "portal-= p" (138.24.1.110) and acceptiong TCP/IP connection on port 5432? run as postgres# export HOSTNAME=3Dhostname# export USERNAME=3Dpostgres# ex= port DATABASE=3Dpostgres=C2=A0# export PORT 5432# pg_dump -v -p $PORT -U $U= SERNAME -d $DATABASE -f /tmp/postgresbakup.sql pg_dump:[archiver (db)]connection to database "DATABASE" failed: FATAL: Ide= nt authentication failed for user "postgres" portal-p already on /etc/hosts. v/r, 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 Tuesday, February 26, 2019 11:01 AM, Shreeyansh Dba wrote: =20 Ohh, It=C2=A0looks your pg_hba entries are correct, reset your database us= er "postgres" password then try=C2=A0again or use -w option, use a single h= ba.conf file. try: pg_dump -v -p $PORT -U $USERNAME -d $DATABASE -f /tmp/postresp.sql Thanks & Regards, Shreeyansh DBA Team www.shreeyansh.com On Tue, Feb 26, 2019 at 9:06 PM Pepe TD Vo wrote: yes mam'm/sir.=C2=A0 =C2=A0I already posted it here it is again. #vi pg_hba.conf=C2=A0 (from /usr/local/pgsql/data/pg_hba.conf)=C2=A0 #TYPE=C2=A0 DATABASE=C2=A0 =C2=A0 =C2=A0USER=C2=A0 =C2=A0 =C2=A0ADDRESS=C2= =A0 =C2=A0 =C2=A0METHOD# "local" is for Unix domain socket connectiosn only local=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0all=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=A0trust # IPv4 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0127.0.0.1/32 trust # IPv6 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0::1/128=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0trust # allow all replication connections from localhost, by a user with the repl= ication privilegelocal=C2=A0 =C2=A0 replication=C2=A0 =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 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 trusthost=C2=A0 =C2=A0 replication=C2=A0 =C2=A0= =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=C2=A0 trusthost= =C2=A0 =C2=A0 replication=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ::1/128=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trust I also found pg_hba.conf on both folders=C2=A0 /var/lib/pgsql/11/data/pg_hb= a.conf & /var/lib/pgsql/data/pg_hba.conf).=C2=A0 I modified it as above and= the script is not working even run from the command prompt. #vi pg_hba.conf ( (from /var/lib/pgsql/11/data/pg_hba.conf & /var/lib/pgsql= /data/pg_hba.conf)=C2=A0 #TYPE=C2=A0 DATABASE=C2=A0 =C2=A0 =C2=A0USER=C2=A0 =C2=A0 =C2=A0ADDRESS=C2= =A0 =C2=A0 =C2=A0METHOD# "local" is for Unix domain socket connectiosn only local=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0all=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=A0trust # IPv4 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0127.0.0.1/32 trust host=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 power= _user 0.0.0.0/0=C2=A0 =C2=A0 =C2=A0md5host=C2=A0 =C2=A0 =C2=A0 all=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 other_user 0.0.0.0/0=C2=A0 =C2=A0 =C2=A0= md5host=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 s= torageLoader 0.0.0.0/0 md5 # IPv6 local connections: host=C2=A0 =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0::1/128=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0trust # allow all replication connections from localhost, by a user with the repl= ication privilegelocal=C2=A0 =C2=A0 replication=C2=A0 =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 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 trusthost=C2=A0 =C2=A0 replication=C2=A0 =C2=A0= =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32=C2=A0 =C2=A0rust= host=C2=A0 =C2=A0 replication=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ::1/128=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trust why do I have 3 pg_hba.conf?=C2=A0 which one should use? thank you for looking into it. v/r,=C2=A0Bach-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 Tuesday, February 26, 2019 9:52 AM, Shreeyansh Dba wrote: =20 The error message says the authentication method used isn't trust. Can you= please share your pg_hba.conf file entries. Thanks & Regards, Shreeyansh DBA Team www.shr Hi Pepe eeyansh.com On Tue, Feb 26, 2019 at 7:41 PM Pepe TD Vo wrote: No sir.=C2=A0 =C2=A0I have tried what your suggestion and still failed. as root: # export HOSTNAME=3D"localhost"# export USERNAME=3D"postgres"# export DATAB= ASE=3D"postgres"# pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" > /= tmp/postresp.sql pg_dump:[archiver (db)] connection to database "DATABASE" failed: FATAL: Id= ent authentication failed for user "postgres" # export HOSTNAME=3D"127.0.0.1"# export USERNAME=3D"postgres"# export DATAB= ASE=3D"postgres"# pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" > /= tmp/postresp.sql pg_dump:[archiver (db)] connection to database "DATABASE" failed: FATAL: Id= ent authentication failed for user "postgres" as same as postgres: #su - postgres =C2=A0export HOSTNAME=3D"localhost"# export USERNAME=3D"postgres"# export D= ATABASE=3D"postgres"# pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME" "$DATABASE"= > /tmp/postresp.sql pg_dump:[archiver (db)] connection to database "DATABASE" failed: FATAL: Id= ent authentication failed for user "postgres" # export HOSTNAME=3D"127.0.0.1"# export USERNAME=3D"postgres"# export DATAB= ASE=3D"postgres"# pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" > /= tmp/postresp.sql pg_dump:[archiver (db)] connection to database "DATABASE" failed: FATAL: Id= ent authentication failed for user "postgres" as the postgres, I can run pgdump dbname > output.sql v/r,=C2=A0Bach-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 Monday, February 25, 2019 2:39 PM, "gilberto.castillo@etecsa.cu" wrote: =20 El 2019-02-25 14:16, Pepe TD Vo escribi=C3=B3: > I am running script in local host (same db server) El 2019-02-25 14:16, Pepe TD Vo escribi=C3=B3: > I am running script in local host (same db server) Please, Check this: root@gilbertoc:/home/gilbertoc# export HOSTNAME=3D"localhost";=20 USERNAME=3D"postgres"; DATABASE=3D"postgres" root@gilbertoc:/home/gilbertoc# pg_dump -Fc -h "$HOSTNAME" -U=20 "$USERNAME" "$DATABASE" > /tmp/postresp.sql Password: pg_dump: [archiver (db)] connection to database "postgres" failed:=20 FATAL:=C2=A0 password authentication failed for user "postgres" FATAL:=C2=A0 password authentication failed for user "postgres" Other: root@gilbertoc:/home/gilbertoc# sudo su - postgres postgres@gilbertoc:~$ export HOSTNAME=3D"localhost"; USERNAME=3D"postgres";= =20 DATABASE=3D"postgres" postgres@gilbertoc:~$ pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME"=20 "$DATABASE" > /tmp/postresp.sql =C2=A0 /tmp/postresp.sql: Permiso denegado Fine: postgres@gilbertoc:~$ export HOSTNAME=3D"127.0.0.1"; USERNAME=3D"postgres";= =20 DATABASE=3D"postgres" postgres@gilbertoc:~$ pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME"=20 "$DATABASE" > /tmp/salvapostgres.backup postgres@gilbertoc:~$ ls /tmp/salvapostgres.backup /tmp/salvapostgres.backup >=20 > Bach-Nga >=20 > 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 > appearances. But to 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 >=C2=A0 On Monday, February 25, 2019 1:58 PM, "gilberto.castillo@etecsa.cu" > wrote: >=20 > El 2019-02-25 13:48, Pepe TD Vo escribi=C3=B3: >=20 >> Thank you for your information. >=20 >> I saw this document this morning and I did check my pg_hba.conf and >=20 >> for local host and tried to connect to the template1/0 and/or other >=20 >> database with postgres fine without prompting me for the password >=20 >>=20 >=20 >> #psql -d template0 -U postgres >=20 >> template0-# >=20 >> #psql -d template1 -U postgres >=20 >> template1-# >=20 >>=20 >=20 >> #psql -d CIDR -U postgres >=20 >> CIDR-# >=20 >> #psql -d postgres -U postgres >=20 >> postgres-# >=20 >>=20 >=20 >> and a pg_hba.conf: >=20 >>=20 >=20 >> " >=20 >>=20 >=20 >> #TYPE=C2=A0 DATABASE=C2=A0 =C2=A0 USER=C2=A0 =C2=A0 ADDRESS=C2=A0 =C2=A0= METHOD >=20 >> local=C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 trust >=20 >> host=C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32 trust >=20 >> host=C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 all=C2=A0 =C2=A0 =C2=A0 =C2=A0 ::1/128=C2=A0 =C2=A0 =C2=A0 =C2=A0 tr= ust >=20 > Look here the IP only connect to localhost. From where Are your > running >=20 > the script? >=20 >> #allo replication connections from localhost, by a user with the >=20 >> replication privilege >=20 >> local=C2=A0 =C2=A0 replication=C2=A0 =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 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 trust >=20 >> host=C2=A0 =C2=A0 replication=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 127..0.1/32=C2=A0 trust >=20 >> host=C2=A0 =C2=A0 replication=C2=A0 =C2=A0 =C2=A0 all=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ::1/128=C2=A0 =C2=A0 =C2=A0 =C2=A0 trust >=20 >>=20 >=20 >> the problem is I'm not sure I need to reconfigure pg_hba.conf with >=20 >> database with user postgres or not? >=20 >>=20 >=20 >> When I'm connecting into the each database and the "show > pg_hba.conf" >=20 >> show nothing. >=20 >>=20 >=20 >> postgres-# show pg_hba.conf >=20 >> postgres-# >=20 >>=20 >=20 >> Bach-Nga >=20 >>=20 >=20 >> No one in this world is pure and perfect.=C2=A0 If you avoid people for >=20 >> their mistakes you will be alone. So judge less, love and forgive >=20 >> more. >=20 >> To call him a dog hardly seems to do him justice though in as much > as >=20 >> he had four legs, a tail, and barked, I admit he was, to all outward >=20 >> appearances. But to those who knew him well, he was a perfect >=20 >> gentleman (Hermione Gingold) >=20 >> **Live simply **Love generously **Care deeply **Speak kindly. >=20 >> *** Genuinely rich *** Faithful talent *** Sharing success >=20 >>=20 >=20 >>=C2=A0 On Monday, February 25, 2019 12:28 PM, Shreeyansh Dba >=20 >> wrote: >=20 >>=20 >=20 >> Hi Pepe, >=20 >>=20 >=20 >> It seems your are using os user for taking the backup. >=20 >>=20 >=20 >> When you run command line commands against the postgres database and >=20 >> they ask for the user and password that is the database user > postgres >=20 >> and its associated password, so when you do something like: psql -d >=20 >> template1 -U postgres the password you will be prompted for is >=20 >> your_db_user password >=20 >>=20 >=20 >> Now the above also depends on what is set in pg_hba.conf for the >=20 >> various combinations of host, database, user and auth_method. >=20 >>=20 >=20 >> For more information see >=20 >>=20 > https://www.postgresql.org/docs/9.5/static/client-authentication.html >=20 >>=20 >=20 >> Thanks & Regards, >=20 >> SHREEYANSH DBA TEAM >=20 >> www.shreeyansh.com [1] >=20 >>=20 >=20 >> On Mon, Feb 25, 2019 at 10:21 PM Pepe TD Vo > wrote: >=20 >>=20 >=20 >>> good morning Expert DBAs, >=20 >>>=20 >=20 >>> I created a script to do backup and I have faced the error of >=20 >>>=20 >=20 >>>> Performing globals backup: >=20 >>>> pg_dumpall: could not connect to database "template1":FATAL: Ident >=20 >>>> authentication failed for user "postgres" fro globals backup.=C2=A0 As >=20 >>>> same as performing schema-only backups and full backup. >=20 >>>>=20 >=20 >>>> Performing schema-only backup: >=20 >>>> psql:FATAL: Ident authentication failed for user "postgres" >=20 >>>> the following databases were matched for schema-only backup: >=20 >>>>=20 >=20 >>>> performing full backup: >=20 >>>> psql:FATAL: Ident authentication failed for user "postgres" >=20 >>>=20 >=20 >>> I can run pg_dumpall > postgresdump.sql as postgres user os but >=20 >>> couldn't run from script even the script declared >=20 >>> BACKUP_USER=3Dpostgres >=20 >>>=20 >=20 >>> If I take the syntax, -H "$HOSTNAME" -U "$USERNAME" out and the >=20 >>> backup script working fine >=20 >>>=20 >=20 >>> # VI PG_BACKUP.CONFIG >=20 >>>=20 >=20 >>> ############################## >=20 >>> ## POSTGRESQL BACKUP CONFIG ## >=20 >>> ############################## >=20 >>>=20 >=20 >>> # Optional system user to run backups as.=C2=A0 If the user the script > is >=20 >>> running as doesn't match this >=20 >>> # the script terminates.=C2=A0 Leave blank to skip check. >=20 >>> BACKUP_USER=3D >=20 >>>=20 >=20 >>> # Optional hostname to adhere to pg_hba policies.=C2=A0 Will default to >=20 >>> "localhost" if none specified. >=20 >>> HOSTNAME=3D"hostname" >=20 >>>=20 >=20 >>> # Optional username to connect to database as.=C2=A0 Will default to >=20 >>> "postgres" if none specified. >=20 >>> USERNAME=3D"postgres" >=20 >>>=20 >=20 >>> # This dir will be created if it doesn't exist.=C2=A0 This must be >=20 >>> writable by the user the script is >=20 >>> # running as. >=20 >>> BACKUP_DIR=3D/home/backups/database/postgresql/ >=20 >>>=20 >=20 >>> # List of strings to match against in database name, separated by >=20 >>> space or comma, for which we only >=20 >>> # wish to keep a backup of the schema, not the data. Any database >=20 >>> names which contain any of these >=20 >>> # values will be considered candidates. (e.g. "system_log" will >=20 >>> match "dev_system_log_2010-01") >=20 >>> SCHEMA_ONLY_LIST=3D"" >=20 >>>=20 >=20 >>> # Will produce a custom-format backup if set to "yes" >=20 >>> ENABLE_CUSTOM_BACKUPS=3Dyes >=20 >>>=20 >=20 >>> # Will produce a gzipped plain-format backup if set to "yes" >=20 >>> ENABLE_PLAIN_BACKUPS=3Dyes >=20 >>>=20 >=20 >>> # Will produce gzipped sql file containing the cluster globals, > like >=20 >>> users and passwords, if set to "yes" >=20 >>> ENABLE_GLOBALS_BACKUPS=3Dyes >=20 >>>=20 >=20 >>> #### SETTINGS FOR ROTATED BACKUPS #### >=20 >>>=20 >=20 >>> # Which day to take the weekly backup from (1-7 =3D Monday-Sunday) >=20 >>> DAY_OF_WEEK_TO_KEEP=3D5 >=20 >>>=20 >=20 >>> # Number of days to keep daily backups >=20 >>> DAYS_TO_KEEP=3D7 >=20 >>>=20 >=20 >>> # How many weeks to keep weekly backups >=20 >>> WEEKS_TO_KEEP=3D5 >=20 >>>=20 >=20 >>> ###################################### >=20 >>>=20 >=20 >>> #VI PG_BACKUP.SH >=20 >>>=20 >=20 >>> #!/bin/bash >=20 >>>=20 >=20 >>> ########################### >=20 >>> ####### LOAD CONFIG ####### >=20 >>> ########################### >=20 >>>=20 >=20 >>> while [ $# -gt 0 ]; do >=20 >>> case $1 in >=20 >>> -c) >=20 >>> if [ -r "$2" ]; then >=20 >>> source "$2" >=20 >>> shift 2 >=20 >>> else >=20 >>> ${ECHO} "Unreadable config file >=20 >>> \"$2\"" 1>&2 >=20 >>> exit 1 >=20 >>> fi >=20 >>> ;; >=20 >>> *) >=20 >>> ${ECHO} "Unknown Option \"$1\"" 1>&2 >=20 >>> exit 2 >=20 >>> ;; >=20 >>> esac >=20 >>> done >=20 >>>=20 >=20 >>> if [ $# =3D 0 ]; then >=20 >>> SCRIPTPATH=3D$(cd ${0%/*} && pwd -P) >=20 >>> source $SCRIPTPATH/pg_backup.config >=20 >>> fi; >=20 >>>=20 >=20 >>> ########################### >=20 >>> #### PRE-BACKUP CHECKS #### >=20 >>> ########################### >=20 >>>=20 >=20 >>> # Make sure we're running as the required backup user >=20 >>> if [ "$BACKUP_USER" !=3D "" -a "$(id -un)" !=3D "$BACKUP_USER" ]; then >=20 >>> echo "This script must be run as $BACKUP_USER. Exiting." 1>&2 >=20 >>> exit 1; >=20 >>> fi; >=20 >>>=20 >=20 >>> ########################### >=20 >>> ### INITIALISE DEFAULTS ### >=20 >>> ########################### >=20 >>>=20 >=20 >>> if [ ! $HOSTNAME ]; then >=20 >>> HOSTNAME=3D"localhost" >=20 >>> fi; >=20 >>>=20 >=20 >>> if [ ! $USERNAME ]; then >=20 >>> USERNAME=3D"postgres" >=20 >>> fi; >=20 >>>=20 >=20 >>> ########################### >=20 >>> #### START THE BACKUPS #### >=20 >>> ########################### >=20 >>>=20 >=20 >>> FINAL_BACKUP_DIR=3D$BACKUP_DIR"`date +\%Y-\%m-\%d`/" >=20 >>>=20 >=20 >>> echo "Making backup directory in $FINAL_BACKUP_DIR" >=20 >>>=20 >=20 >>> if ! mkdir -p $FINAL_BACKUP_DIR; then >=20 >>> echo "Cannot create backup directory in $FINAL_BACKUP_DIR. Go >=20 >>> and fix it!" 1>&2 >=20 >>> exit 1; >=20 >>> fi; >=20 >>>=20 >=20 >>> ####################### >=20 >>> ### GLOBALS BACKUPS ### >=20 >>> ####################### >=20 >>>=20 >=20 >>> echo -e "\n\nPerforming globals backup" >=20 >>> echo -e "--------------------------------------------\n" >=20 >>>=20 >=20 >>> if [ $ENABLE_GLOBALS_BACKUPS =3D "yes" ] >=20 >>> then >=20 >>> echo "Globals backup" >=20 >>>=20 >=20 >>> if ! pg_dumpall -g -h "$HOSTNAME" -U "$USERNAME" | gzip > >=20 >>> $FINAL_BACKUP_DIR"globals".sql.gz.in_progress; then >=20 >>> echo "[!!ERROR!!] Failed to produce globals backup" >=20 >>> 1>&2 >=20 >>> else >=20 >>> mv $FINAL_BACKUP_DIR"globals".sql.gz.in_progress >=20 >>> $FINAL_BACKUP_DIR"globals".sql.gz >=20 >>> fi >=20 >>> else >=20 >>> echo "None" >=20 >>> fi >=20 >>>=20 >=20 >>> ########################### >=20 >>> ### SCHEMA-ONLY BACKUPS ### >=20 >>> ########################### >=20 >>>=20 >=20 >>> for SCHEMA_ONLY_DB in ${SCHEMA_ONLY_LIST//,/ } >=20 >>> do >=20 >>> SCHEMA_ONLY_CLAUSE=3D"$SCHEMA_ONLY_CLAUSE or datname ~ >=20 >>> '$SCHEMA_ONLY_DB'" >=20 >>> done >=20 >>>=20 >=20 >>> SCHEMA_ONLY_QUERY=3D"select datname from pg_database where false >=20 >>> $SCHEMA_ONLY_CLAUSE order by datname;" >=20 >>>=20 >=20 >>> echo -e "\n\nPerforming schema-only backups" >=20 >>> echo -e "--------------------------------------------\n" >=20 >>>=20 >=20 >>> SCHEMA_ONLY_DB_LIST=3D`psql -h "$HOSTNAME" -U "$USERNAME" -At -c >=20 >>> "$SCHEMA_ONLY_QUERY" postgres` >=20 >>>=20 >=20 >>> echo -e "The following databases were matched for schema-only >=20 >>> backup:\n${SCHEMA_ONLY_DB_LIST}\n" >=20 >>>=20 >=20 >>> for DATABASE in $SCHEMA_ONLY_DB_LIST >=20 >>> do >=20 >>> echo "Schema-only backup of $DATABASE" >=20 >>>=20 >=20 >>> if ! pg_dump -Fp -s -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" | >=20 >>> gzip > $FINAL_BACKUP_DIR"$DATABASE"_SCHEMA.sql.gz.in_progress; then >=20 >>> echo "[!!ERROR!!] Failed to backup database schema of >=20 >>> $DATABASE" 1>&2 >=20 >>> else >=20 >>> mv $FINAL_BACKUP_DIR"$DATABASE"_SCHEMA.sql.gz.in_progress >=20 >>> $FINAL_BACKUP_DIR"$DATABASE"_SCHEMA.sql.gz >=20 >>> fi >=20 >>> done >=20 >>>=20 >=20 >>> ########################### >=20 >>> ###### FULL BACKUPS ####### >=20 >>> ########################### >=20 >>>=20 >=20 >>> for SCHEMA_ONLY_DB in ${SCHEMA_ONLY_LIST//,/ } >=20 >>> do >=20 >>> EXCLUDE_SCHEMA_ONLY_CLAUSE=3D"$EXCLUDE_SCHEMA_ONLY_CLAUSE and >=20 >>> datname !~ '$SCHEMA_ONLY_DB'" >=20 >>> done >=20 >>>=20 >=20 >>> FULL_BACKUP_QUERY=3D"select datname from pg_database where not >=20 >>> datistemplate and datallowconn $EXCLUDE_SCHEMA_ONLY_CLAUSE order by >=20 >>> datname;" >=20 >>>=20 >=20 >>> echo -e "\n\nPerforming full backups" >=20 >>> echo -e "--------------------------------------------\n" >=20 >>>=20 >=20 >>> for DATABASE in `psql -h "$HOSTNAME" -U "$USERNAME" -At -c >=20 >>> "$FULL_BACKUP_QUERY" postgres` >=20 >>> do >=20 >>> if [ $ENABLE_PLAIN_BACKUPS =3D "yes" ] >=20 >>> then >=20 >>> echo "Plain backup of $DATABASE" >=20 >>>=20 >=20 >>> if ! pg_dump -Fp -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" | >=20 >>> gzip > $FINAL_BACKUP_DIR"$DATABASE".sql.gz.in_progress; then >=20 >>> echo "[!!ERROR!!] Failed to produce plain backup >=20 >>> database $DATABASE" 1>&2 >=20 >>> else >=20 >>> mv $FINAL_BACKUP_DIR"$DATABASE".sql.gz.in_progress >=20 >>> $FINAL_BACKUP_DIR"$DATABASE".sql.gz >=20 >>> fi >=20 >>> fi >=20 >>>=20 >=20 >>> if [ $ENABLE_CUSTOM_BACKUPS =3D "yes" ] >=20 >>> then >=20 >>> echo "Custom backup of $DATABASE" >=20 >>>=20 >=20 >>> if ! pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" >=20 >>> -f $FINAL_BACKUP_DIR"$DATABASE".custom.in_progress; then >=20 >>> echo "[!!ERROR!!] Failed to produce custom backup >=20 >>> database $DATABASE" 1>&2 >=20 >>> else >=20 >>> mv $FINAL_BACKUP_DIR"$DATABASE".custom.in_progress >=20 >>> $FINAL_BACKUP_DIR"$DATABASE".custom >=20 >>> fi >=20 >>> fi >=20 >>>=20 >=20 >>> done >=20 >>>=20 >=20 >>> echo -e "\nAll database backups complete!" >=20 >>>=20 >=20 >>> I'm appreciate if anyone know how to correct this? >=20 >>>=20 >=20 >>> thank you. >=20 >>>=20 >=20 >>> v/r, >=20 >>>=20 >=20 >>> Bach-Nga >=20 >>>=20 >=20 >>> No one in this world is pure and perfect.=C2=A0 If you avoid people for >=20 >>> their mistakes you will be alone. So judge less, love and forgive >=20 >>> more. >=20 >>> To call him a dog hardly seems to do him justice though in as much >=20 >>> as he had four legs, a tail, and barked, I admit he was, to all >=20 >>> outward appearances. But to those who knew him well, he was a >=20 >>> perfect gentleman (Hermione Gingold) >=20 >>> **Live simply **Love generously **Care deeply **Speak kindly. >=20 >>> *** Genuinely rich *** Faithful talent *** Sharing success >=20 >>=20 >=20 >>=20 >=20 >>=20 >=20 >> Links: >=20 >> ------ >=20 >> [1] http://www.shreeyansh.com/ =20 =20 =20 =20 ------=_Part_5704636_1724133509.1551207564839 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have tried to see the file read from pg_hba.conf and the confi= g file within psql

#postgres=3D# select pg_read_file('pg_hba.conf');

#TYPE  DATABASE     USER     ADDRESS=      METHOD
# "local" is for Unix domain socket connectiosn = only
local     all       = ;          all          &= nbsp;                  trust
<= br id=3D"yui_3_16_0_ym19_1_1551114507366_394990">
# IPv4 local connections:

host     all        &nbs= p;        all         127.0.0.= 1/32 trust

# IPv6 local connections:

host     all=                  all  &nb= sp;      ::1/128         trust

# allow all replicat= ion connections from localhost, by a user with the replication privilege
local&nbs= p;   replication      all        &n= bsp;                     = trust
h= ost    replication      all      &n= bsp;   127.0.0.1/32  trust
host    replication    &n= bsp; all          ::1/128      &nbs= p;  trust


I also found pg_hba.conf on both fold= ers  /var/lib/pgsql/11/data/pg_hba.conf & /var/lib/pgsql/data/pg_h= ba.conf).  I modified it as above and the script is not working even r= un from the command prompt.

#vi pg_hba.conf ( (f= rom /var/lib/pgsql/11/data/pg_hba.conf & /var/lib/pgsql/data/pg_hba.con= f) 

#TYPE  DATABASE     USER  &= nbsp;  ADDRESS     METHOD
# "local" is for Unix domain = socket connectiosn only

local     all  &n= bsp;              all     = ;                     &nb= sp;  trust

# IPv4 local connections:
=

host     all    &n= bsp;            all       = ;  127.0.0.1/32 trust
host   =   all            power_user 0.0.0.0/0&n= bsp;    md5
host      all        &nbs= p;   other_user 0.0.0.0/0      md5
host      al= l            storageLoader 0.0.0.0/0 md5

# IPv6 local co= nnections:

host     all    &n= bsp;            all       = ;  ::1/128         trust

# allow all replication connections = from localhost, by a user with the replication privilege
local    replic= ation      all            &nbs= p;                 trust
host   = replication      all          127.= 0.0.1/32   rust
host    replication      all&nb= sp;         ::1/128         tr= ust
(1 ro= w)

=
postgr= es=3D# select pg_conf_load_time() > modification from pg_stat_file('pg_h= ba.conf'):
?column?
----------
f
(1 row)

Can you tell me what "f" mean?  force?  load time should be b= y date?

h= ow come, when I show pg_hba.conf from psql, it didn't give any row return?<= /div>
&n= bsp;
<= font color=3D"#8000ff">
<= /font>= Bach-Nga
No one in this world is pure and perfect.  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 appearances. But to those who knew him wel= l, he was a perfect gentleman (Hermione Gingold)
=
**Live simply **Love generously **Care deeply *= *Speak kindly.
*** Genuinely rich *** Faithful talent *** Sh= aring success

On Tuesday, February 26, 2019 12:47 PM, Pepe TD Vo <pepev= o@yahoo.com> wrote:


same error:

run as root:
# export HOSTNAME=3Dhos= tname
# export USERNAME=3Dpostgres
# export DATABASE=3Dpostgres=  
# export PORT 5432
# pg_dump -v -p $PORT -U $USERNAME -d $DATABASE -= f /tmp/postgresbakup.sql

pg_dump:[archiver (db)]connect= ion to database "DATABASE" failed: could not connect to server: Connection = refused
Is the server running on host "portal-p" (138.24.1.110) and a= cceptiong TCP/IP connection on port 5432?

r= un as postgres
# export HOSTNAME=3Dhostname
# export USERNAME= =3Dpostgres
# export DATABASE=3Dpostgres 
# export PORT 5432
# p= g_dump -v -p $PORT -U $USERNAME -d $DATABASE -f /tmp/postgresbakup.sql

=
pg_dump:[archiver (db)]connection to database "DATABASE" failed: FATAL: Id= ent authentication failed for user "postgres"


portal-p already on /etc/hosts.

v/r,


=
Bac= h-Nga

No one in this world is pure= and perfect.  If you avoid people for their mistakes you will be alon= e. So judge less, love and forgive more.
To call him a dog hardly seem= s to do him justice though in as much as he had four legs, a tail, and bark= ed, I admit he was, to all outward appearances. But to those who knew him w= ell, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously = **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success<= /span>


On Tuesday, February 26, 2019 11:= 01 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


Ohh, It lo= oks your pg_hba entries are correct, reset your database user "postgres" pa= ssword then try again or use -w option, use a single hba.conf file.
try: pg_dump -v -p $PORT -U $USERNAME -d = $DATABASE -f /tmp/postresp.sql

=
=
Thanks & Regards,
Shreeyansh DBA Team
www.shreeyansh.com
<= /div>


On Tue, Feb 26, 2019 at 9:06 = PM Pepe TD Vo <pepevo@yah= oo.com> wrote:
yes mam'm/sir.&nb= sp;  I already posted it

here it is again.

#vi pg_hba.conf  (from /usr/local/pgsql/data/pg_hb= a.conf) 

#TYPE  DATABASE     USER  &= nbsp;  ADDRESS     METHOD
# "local" is for Unix domain socket connectiosn on= ly

=
lo= cal     all              =    all                &nb= sp;            trust

# IPv4 local connectio= ns:

host =    all                &n= bsp;all         127.0.0.1/32 trust

<= /span>
# IPv6 local connections:

host     all  &nb= sp;              all     =    ::1/128         trust

# allow all replic= ation connections from localhost, by a user with the replication privilege<= /div>
local    replicati= on      all              =                 trust
host    replication   = ;   all          127.0.0.1/32  trust
=
host    replication&nbs= p;     all          ::1/128   =      trust
<= br clear=3D"none" id=3D"yiv7521747274gmail-m_-6997542720245005570yiv0143508= 912yui_3_16_0_ym19_1_1551114507366_234998">

I also found pg_hba.conf on both folders  /var/lib/pgsql/11/da= ta/pg_hba.conf & /var/lib/pgsql/data/pg_hba.conf).  I modified it = as above and the script is not working even run from the command prompt.

#vi pg_hb= a.conf ( (from /var/lib/pgsql/11/data/pg_hba.conf & /var/lib/pgsql/data= /pg_hba.conf) 

#TYPE  = DATABASE     USER     ADDRESS    &n= bsp;METHOD
# "local" is for Unix d= omain socket connectiosn only

= local     all             = ;    all                &= nbsp;            trust

# IPv4 local connections:

host     all          =        all         127.0.0.1/32 = trust
host      all      &= nbsp;     power_user 0.0.0.0/0     md5
host      all        &= nbsp;   other_user 0.0.0.0/0      md5
host      all          =   storageLoader 0.0.0.0/0 md5

# IPv6 local co= nnections:

host  &= nbsp;  all                &nbs= p;all         ::1/128        &= nbsp;trust

# allow all replication connec= tions from localhost, by a user with the replication privilege
local    replication      al= l                    &nbs= p;         trust
host=     replication      all       = ;   127.0.0.1/32   rust
host=     replication      all       = ;   ::1/128         trust


why do I have 3 pg_hba.conf?  which one should use?<= /div>

thank you for looking into it.
=

v/r,
 
Bach-Nga

No one in this world is pure and perfect. = ; 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 muc= h as he had four legs, a tail, and barked, I admit he was, to all outward a= ppearances. But to those who knew him well, he was a perfect gentleman (Her= mione Gingold)

**Live simply **Love generous= ly **Care deeply **Speak kindly.
<= span class=3D"yiv7521747274gmail-m_-6997542720245005570yiv0143508912sg" id= =3D"yiv7521747274gmail-m_-6997542720245005570yiv0143508912yui_3_13_0_rc_1_1= _1381789421038_7865">*** Gen= uinely rich *** Faithful talent *** Sharing success


On Tuesday, February 26, 201= 9 9:52 AM, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:


The error message says the authentication meth= od used isn't trust. Can you please share your pg_hba.conf file entries.
=
Thanks & Regards,
Shreeyansh DBA Team
www.shr Hi Pepe eeyansh.com
=



pg_dump:[= archiver (db)] connection to database "DATABASE" failed: FATAL: Ident authe= ntication failed for user "postgres"

# export HOSTNAME=3D"127.0.0.1"
# export USERNAME=3D"postgres"
# export DATABASE= =3D"postgres"
# pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" > = /tmp/postresp.sql

pg_dump:[archiver (db)] connection to= database "DATABASE" failed: FATAL: Ident authentication failed for user "p= ostgres"


as same as postgres:

#su - postgres

 export H= OSTNAME=3D"localhost"
# export USERNAME=3D"postgres"
# export DATABASE=3D= "postgres"
# pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" > /tm= p/postresp.sql

pg_dump:[archiver (db)] connection to da= tabase "DATABASE" failed: FATAL: Ident authentication failed for user "post= gres"

# export HOSTNAME=3D"127.0.0.1"
# export USERNAME=3D"po= stgres"
# export DATABASE=3D"postgres"
# pg_dump -Fc -h "$HOSTNAME" -U "$US= ERNAME" "$DATABASE" > /tmp/postresp.sql

pg_dump:[ar= chiver (db)] connection to database "DATABASE" failed: FATAL: Ident authent= ication failed for user "postgres"


as the postgres, I can run pgdump dbname > output= .sql
<= span>
v/r,
 
Bach-Ng= a

No one in this world is pure and= perfect.  If you avoid people for their mistakes you will be alone. S= o judge less, love and forgive more.
To call him a dog hardly seems to do him justi= ce though in as much as he had four legs, a tail, and barked, I admit he wa= s, to all outward appearances. But to those who knew him well, he was a per= fect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kind= ly.
*** Genuinely rich *** Fai= thful talent *** Sharing success




El 2019-02-25 14:16, Pepe TD Vo escr= ibi=C3=B3:
> I am running scrip= t in local host (same db server)
<= br clear=3D"none">
El 2019-02-25 14:16, Pepe TD Vo es= cribi=C3=B3:
> I am running scr= ipt in local host (same db server)


Please, Check this:

root@gilbertoc:/home/gilbertoc# export HOSTNAME=3D"localhost";
USERNAME=3D"postgres"; DATABASE=3D"= postgres"

root@gilbertoc= :/home/gilbertoc# pg_dump -Fc -h "$HOSTNAME" -U
"$USERNAME" "$DATABASE" > /tmp/postresp.sql
Password:
pg_dump: [archiver (db)] connection to database "postgres" failed:=
FATAL:  password authentica= tion failed for user "postgres"
FA= TAL:  password authentication failed for user "postgres"


Other:

root@gilbertoc:/home/gilbertoc# sudo su - postgres<= br clear=3D"none">

postgres@gilber= toc:~$ export HOSTNAME=3D"localhost"; USERNAME=3D"postgres";
DATABASE=3D"postgres"

postgres@gilbertoc:~$ pg_dump -F= c -h "$HOSTNAME" -U "$USERNAME"
"= $DATABASE" > /tmp/postresp.sql
=   /tmp/postresp.sql: Permiso denegado


Fine:

postgres@gilbertoc:~$ export HOSTNAME=3D"127.0.0.1"; USERNAME= =3D"postgres";
DATABASE=3D"postgr= es"

postgres@gil= bertoc:~$ pg_dump -Fc -h "$HOSTNAME" -U "$USERNAME"
=
"$DATABASE" > /tmp/salvapostgres.backup
postgres@gilbertoc:~$ ls /tmp/salvapostgres.backup
/tmp/salvapostgres.backup
<= /div>


>
> Bach-Nga
>
> No one in this world is pure and perf= ect.  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 le= gs, a tail, and barked, I admit he was, to all outward
> appearances. But to those who knew him well, he w= as a perfect
> gentleman (Hermi= one Gingold)
> **Live simply **= Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success=
>
>  On Monday, February 25, 2019 1:58 PM, "gilberto.castillo= @etecsa.cu"
> <= br clear=3D"none">
> El 2019-02-25 13:48, Pepe TD = Vo escribi=C3=B3:
>
>> Thank you for your information.
>
>> I saw this document this morning and I did check my pg= _hba.conf and
>
>> for local host and tried to connect to = the template1/0 and/or other
> =
>> database with postgres f= ine without prompting me for the password
>
>>
>
>> #psql -d template0 -U postgres
>
>> template= 0-#
>
=
>> #psql -d template1 -U postgres
=
>
>&= gt; template1-#
>
>>
>
>> #psql -d CIDR = -U postgres
>
>> CIDR-#
>
>> #psql -d p= ostgres -U postgres
>
>> postgres-#
>
>> =
>
>> and a pg_hba.conf:
>
>>
>
>> "
>
>>
>
>> #TYPE  DA= TABASE    USER    ADDRESS    METHOD
>
>> local    all          &nbs= p;     all               =             trust
>
>> host=     all                al= l        127.0.0.1/32 trust
>
>> host&= nbsp;   all                all=         ::1/128        trust
>
> Look here the IP only connect to localhost. From where Are yo= ur
> running
=
>
> = the script?
>
>> #allo replication connections from localh= ost, by a user with the
>
>> replication privilege
>
>> local    replication      all =                     &nbs= p;       trust
>=
>> host    repli= cation      all          127..0.1/3= 2  trust
>
>> host    replication  &nb= sp;   all          ::1/128     = ;   trust
>
>>
>
>> the problem is = I'm not sure I need to reconfigure pg_hba.conf with
>
>> d= atabase with user postgres or not?
>
>>
>
>= > When I'm connecting into the each database and the "show
> pg_hba.conf"
>
>> show no= thing.
>
>>
>=
>> postgres-# show pg_hba.= conf
>
>> postgres-#
>
>>
>
&= gt;> Bach-Nga
>
>>
>
>> No one in thi= s world is pure and perfect.  If you avoid people for
>
>= ;> their mistakes you will be alone. So judge less, love and forgive
>
>> more.
>
>> To call him a dog hardly see= ms 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 thos= e who knew him well, he was a perfect
>
>> gentleman (Herm= ione Gingold)
>
>> **Live simply **Love generously **Care = deeply **Speak kindly.
>
>> *** Genuinely rich *** Faithfu= l talent *** Sharing success
> =
>>
>
>>&n= bsp; On Monday, February 25, 2019 12:28 PM, Shreeyansh Dba
>
>
>>
>
&= gt;> Hi Pepe,
>
>>
>
>> It seems your= are using os user for taking the backup.
>
>>
>
>> When you run command line commands against the postgres datab= ase and
>
>> they ask for the user and password that is th= e database user
> postgres
>
>> and its associated password, so when you do something lik= e: psql -d
>
>> template1 -U postgres the password you wil= l be prompted for is
>
>> your_db_user password
>
>>
>
>> Now the above also depends on what is = set in pg_hba.conf for the
>
>> various combinations of ho= st, database, user and auth_method.
>
>>
>
>= ;> For more information see
>= ;
>>
>
>>
> =
>> Thanks & Regards,
>
>> SHREEYANSH DBA TEAM
>
> <= br clear=3D"none">
>>
=
>
>> On= Mon, Feb 25, 2019 at 10:21 PM Pepe TD Vo <pepevo@yahoo.com>
> wrote:
>
>>
>
>>> good = morning Expert DBAs,
>
>>>
>
>>> I= created a script to do backup and I have faced the error of
>
&= gt;>>
>
>>>> Performing globals backup:
>
>>>> pg_dumpall: could not connect to database "templa= te1":FATAL: Ident
>
>>>> authentication failed for= user "postgres" fro globals backup.  As
>
>>>>= same as performing schema-only backups and full backup.
=
>
>&= gt;>>
>
>>>> Performing schema-only backup:
>
>>>> psql:FATAL: Ident authentication failed for us= er "postgres"
>
>>>> the following databases were ma= tched for schema-only backup:
>=
>>>>
>
&= gt;>>> performing full backup:
>
>>>> psql:= FATAL: Ident authentication failed for user "postgres"
>
>>= ;>
>
>>> I can run pg_dumpall > postgresdump.sql= as postgres user os but
>
>>> couldn't run from script= even the script declared
>
>>> BACKUP_USER=3Dpostgres<= br clear=3D"none">
>
>>>
>
>>> If I take the syntax, = -H "$HOSTNAME" -U "$USERNAME" out and the
>
>>> backup= script working fine
>
>>>
>
>>> #= VI PG_BACKUP.CONFIG
>
>>>
>
>>> #= #############################
>=
>>> ## POSTGRESQL BACKU= P CONFIG ##
>
>>> ##############################
>
>>>
>
>>> # Optional system user to = run backups as.  If the user the script
> is
>
>>> running as doesn't match this=
>
>>> # the script terminates.  Leave blank to sk= ip check.
>
=
>>> BACKUP_USER=3D
=
>
>>>= ;
>
<= div dir=3D"ltr">>>> # Optional hostname to adhere to pg_hba polici= es.  Will default to
>
>>> "localhost" if none spe= cified.
>
>>> HOSTNAME=3D"hostname"
<= /div>
>
>&g= t;>
>
>>> # Optional username to connect to databas= e as.  Will default to
> <= br clear=3D"none">
>>> "postgres" if none sp= ecified.
>
<= /div>
>>> USERNAME=3D"postgres"
=
>
>&= gt;>
>
<= /div>
>>> # This dir will be created if it doesn't= exist.  This must be
>
>>> writable by the user t= he script is
>
>>> # running as.
>
>>&= gt; BACKUP_DIR=3D/home/backups/database/postgresql/
>
>>&g= t;
>
=
>>> # List of strings to match against in databas= e name, separated by
>
>>> space or comma, for which we= only
>
>>> # wish to keep a backup of the schema, not = the data. Any database
>
>>> names which contain any of= these
>
>>> # values will be considered candidates. (e= .g. "system_log" will
>
>>> match "dev_system_log_2010-= 01")
>
>>> SCHEMA_ONLY_LIST=3D""
>
>>&= gt;
>
>>> # Will produce a custom-format backup if set= to "yes"
>
=
>>> ENABLE_CUSTOM_BACKUPS=3Dyes
>
>>>
>
>>> # Will produce a gzipped plain-fo= rmat backup if set to "yes"
> <= br clear=3D"none">
>>> ENABLE_PLAIN_BACKUPS= =3Dyes
>
>>>
= >
>>> # Will produce = gzipped sql file containing the cluster globals,
> like
>
>>> users and passwords, if = set to "yes"
>
>>> ENABLE_GLOBALS_BACKUPS=3Dyes
>
>>>
>
>>> #### SETTINGS FOR ROTATED BAC= KUPS ####
>
=
>>>
>
>>> # Which day = to take the weekly backup from (1-7 =3D Monday-Sunday)
>
>>= ;> DAY_OF_WEEK_TO_KEEP=3D5
>=
>>>
=
>
>&= gt;> # Number of days to keep daily backups
>
>>> DA= YS_TO_KEEP=3D7
>
>>>
>
>>> # How = many weeks to keep weekly backups
= >
>>> WEEKS_TO_KEEP= =3D5
>
>>>
&g= t;
>>> #################= #####################
>
>>>
>
>>> = #VI PG_BACKUP.SH
>
>>>
>
>>> #!/bi= n/bash
>
>>>
= >
>>> ###############= ############
>
>>> ####### LOAD CONFIG #######
>
>>> ###########################
>
>>>
>
>>> while [ $# -gt 0 ]; do
>
>>> ca= se $1 in
>
<= /div>
>>> -c)
>
>>> if [ -r "$= 2" ]; then
>
>>> source "$2"
>
>>> = shift 2
>
>>> else
>
>>> ${ECHO} "U= nreadable config file
>
>>> \"$2\"" 1>&2
>
>>> exit 1
>
>>> fi
>
>>= ;> ;;
>
<= /div>
>>> *)
>
>>> ${ECHO} "Un= known Option \"$1\"" 1>&2
&= gt;
>>> exit 2
>
>>> ;;
>
>>> esac
>
>>&g= t; done
>
>>>
>
>>> if [ $# =3D 0 = ]; then
>
>>> SCRIPTPATH=3D$(cd ${0%/*} && pwd = -P)
>
=
>>> source $SCRIPTPATH/pg_backup.config
>
>>> fi;
>
>>>
>
>>> = ###########################
> <= br clear=3D"none">
>>> #### PRE-BACKUP CHECK= S ####
>
>>> ###########################
>
&= gt;>>
>
>>> # Make sure we're running as the req= uired backup user
>
>>> if [ "$BACKUP_USER" !=3D "" -= a "$(id -un)" !=3D "$BACKUP_USER" ]; then
>
>>> echo "= This script must be run as $BACKUP_USER. Exiting." 1>&2
>
>>> exit 1;
>
>>> fi;
>
>>&g= t;
>
=
>>> ###########################
>
>= >> ### INITIALISE DEFAULTS ###
>
>>> ############= ###############
>
>>>
>
>>> if [ != $HOSTNAME ]; then
>
>>> HOSTNAME=3D"localhost"
>
>>> fi;
>
>>>
>
>>&= gt; if [ ! $USERNAME ]; then
> =
>>> USERNAME=3D"postgres= "
>
>>> fi;
&g= t;
>>>
>
>= ;>> ###########################
>
>>> #### START = THE BACKUPS ####
>
>>> ###########################
>
>>>
>
>>> FINAL_BACKUP_DIR=3D$BACKUP= _DIR"`date +\%Y-\%m-\%d`/"
>
>>>
>
>>= > echo "Making backup directory in $FINAL_BACKUP_DIR"
=
>
>&= gt;>
>
<= /div>
>>> if ! mkdir -p $FINAL_BACKUP_DIR; then
>
>>> echo "Cannot create backup directory in $FINAL_BACK= UP_DIR. Go
>
>>> and fix it!" 1>&2
>
= >>> exit 1;
>
>>> fi;
=
>
>>>= ;
>
<= div dir=3D"ltr">>>> #######################
>
>>&= gt; ### GLOBALS BACKUPS ###
> <= br clear=3D"none">
>>> #####################= ##
>
<= div dir=3D"ltr">>>>
>=
>>> echo -e "\n\nPerfor= ming globals backup"
>
>>> echo -e "-------------------= -------------------------\n"
> =
>>>
<= /div>
>
>&g= t;> if [ $ENABLE_GLOBALS_BACKUPS =3D "yes" ]
>
>>> t= hen
>
=
>>> echo "Globals backup"
>
>>&g= t;
>
=
>>> if ! pg_dumpall -g -h "$HOSTNAME" -U "$USERNA= ME" | gzip >
>
>>> $FINAL_BACKUP_DIR"globals".sql.gz= .in_progress; then
>
>>> echo "[!!ERROR!!] Failed to p= roduce globals backup"
>
>>> 1>&2
>
&= gt;>> else
>
>>> mv $FINAL_BACKUP_DIR"globals".sq= l.gz.in_progress
>
>>> $FINAL_BACKUP_DIR"globals".sql.g= z
>
>>> fi
>= ;
>>> else
>
= >>> echo "None"
>
>>> fi
>
>>= >
>
>>> ###########################
>
&g= t;>> ### SCHEMA-ONLY BACKUPS ###
>
>>> ##########= #################
>
>>>
>
>>> fo= r SCHEMA_ONLY_DB in ${SCHEMA_ONLY_LIST//,/ }
>
>>> do
>
>>> SCHEMA_ONLY_CLAUSE=3D"$SCHEMA_ONLY_CLAUSE or datna= me ~
>
>>> '$SCHEMA_ONLY_DB'"
<= div dir=3D"ltr">>
>>>= done
>
>>>
&= gt;
>>> SCHEMA_ONLY_QUER= Y=3D"select datname from pg_database where false
>
>>> = $SCHEMA_ONLY_CLAUSE order by datname;"
>
>>>
>
>>> echo -e "\n\nPerforming schema-only backups"
>
>>> echo -e "--------------------------------------------\n"
>
>>>
>
>>> SCHEMA_ONLY_DB_LIST=3D`psq= l -h "$HOSTNAME" -U "$USERNAME" -At -c
>
>>> "$SCHEMA_O= NLY_QUERY" postgres`
>
>>>
>
>>> e= cho -e "The following databases were matched for schema-only
>
&= gt;>> backup:\n${SCHEMA_ONLY_DB_LIST}\n"
>
>>>
>
>>> for DATABASE in $SCHEMA_ONLY_DB_LIST
>
= >>> do
>
>>> echo "Schema-only backup of $DATA= BASE"
>
>>>
&= gt;
>>> if ! pg_dump -Fp= -s -h "$HOSTNAME" -U "$USERNAME" "$DATABASE" |
>
>>> g= zip > $FINAL_BACKUP_DIR"$DATABASE"_SCHEMA.sql.gz.in_progress; then
>
>>> echo "[!!ERROR!!] Failed to backup database schema of=
>
>>> $DATABASE" 1>&2
<= div dir=3D"ltr">>
>>>= else
>
>>> mv $FINAL_BACKUP_DIR"$DATABASE"_SCHEMA.sql.= gz.in_progress
>
>>> $FINAL_BACKUP_DIR"$DATABASE"_SCHEM= A.sql.gz
>
<= /div>
>>> fi
>
>>> done
>
>>>
>
>>> ##########################= #
>
>>> ###### FULL BACKUPS #######
<= /div>
>
>&g= t;> ###########################
>
>>>
>
= >>> for SCHEMA_ONLY_DB in ${SCHEMA_ONLY_LIST//,/ }
>
&g= t;>> do
>
>>> EXCLUDE_SCHEMA_ONLY_CLAUSE=3D"$EXCL= UDE_SCHEMA_ONLY_CLAUSE and
>
>>> datname !~ '$SCHEMA_ON= LY_DB'"
>
>>> done
>
>>>
>
>>> FULL_BACKUP_QUERY=3D"select datname from pg_database wher= e not
>
>>> datistemplate and datallowconn $EXCLUDE_SCH= EMA_ONLY_CLAUSE order by
>
>>> datname;"
>
&= gt;>>
>
>>> echo -e "\n\nPerforming full backups= "
>
>>> echo -e "--------------------------------------= ------\n"
>
=
>>>
>
>>> for DATABASE= in `psql -h "$HOSTNAME" -U "$USERNAME" -At -c
>
>>> "$= FULL_BACKUP_QUERY" postgres`
> =
>>> do
>
>= >> if [ $ENABLE_PLAIN_BACKUPS =3D "yes" ]
>
>>> t= hen
>
=
>>> echo "Plain backup of $DATABASE"
>
>>>
>
>>> if ! pg_dump -Fp -h "$HOSTNAME" -U= "$USERNAME" "$DATABASE" |
>
>>> gzip > $FINAL_BACKU= P_DIR"$DATABASE".sql.gz.in_progress; then
>
>>> echo "= [!!ERROR!!] Failed to produce plain backup
>
>>> databa= se $DATABASE" 1>&2
>
>>> else
=
>
>&= gt;> mv $FINAL_BACKUP_DIR"$DATABASE".sql.gz.in_progress
>
>= ;>> $FINAL_BACKUP_DIR"$DATABASE".sql.gz
>
>>> fi<= br clear=3D"none">
>
>>> fi
> =
>>>
<= /div>
>
>&g= t;> if [ $ENABLE_CUSTOM_BACKUPS =3D "yes" ]
>
>>> th= en
>
<= div dir=3D"ltr">>>> echo "Custom backup of $DATABASE"
>
>>>
>
>>> if ! pg_dump -Fc -h "$HOSTNAME" -U= "$USERNAME" "$DATABASE"
>
>>> -f $FINAL_BACKUP_DIR"$DA= TABASE".custom.in_progress; then
&= gt;
>>> echo "[!!ERROR!!= ] Failed to produce custom backup
= >
>>> database $DATAB= ASE" 1>&2
>
>>> else
>
>>> m= v $FINAL_BACKUP_DIR"$DATABASE".custom.in_progress
<= div dir=3D"ltr">>
>>>= $FINAL_BACKUP_DIR"$DATABASE".custom
>
>>> fi
>
>>> fi
>
>>>
>
>>> d= one
>
=
>>>
>= ;
>>> echo -e "\nAll dat= abase backups complete!"
>
>>>
>
>>&g= t; I'm appreciate if anyone know how to correct this?
>
>>= >
>
>>> thank you.
>
>>>
>
>>> v/r,
>
>>>
>
>>= > Bach-Nga
>
>>>
>
>>> No one= in this world is pure and perfect.  If you avoid people for
>
>>> their mistakes you will be alone. So judge less, love and= forgive
>
<= /div>
>>> more.
>
>>> To cal= l him a dog hardly seems to do him justice though in as much
>
&= gt;>> as he had four legs, a tail, and barked, I admit he was, to all=
>
>>> outward appearances. But to those who knew him w= ell, he was a
>
>>> perfect gentleman (Hermione Gingold= )
>
>>> **Live simply **Love generously **Care deeply *= *Speak kindly.
>
>>> *** Genuinely rich *** Faithful ta= lent *** Sharing success
>
>>
>
>>
>
>>
>
>> Links:
>
>> ----= --
>
<= div dir=3D"ltr">>> [1] http://www.shreeyansh.com/


=






------=_Part_5704636_1724133509.1551207564839--