pg_dumpall backup script w. ftp ; pgpass file ; after upgrade to Ubuntu 10.4 (lucid) and Postgresql 9.0.2

Поиск
Список
Период
Сортировка
От MargaretGillon@chromalloy.com
Тема pg_dumpall backup script w. ftp ; pgpass file ; after upgrade to Ubuntu 10.4 (lucid) and Postgresql 9.0.2
Дата
Msg-id OF3F8F2505.A295735A-ON8825781F.005A42C1-8825781F.00691067@LocalDomain
обсуждение исходный текст
Ответы Re: pg_dumpall backup script w. ftp ; pgpass file ; after upgrade to Ubuntu 10.4 (lucid) and Postgresql 9.0.2
Список pgsql-general
<font face=3D"Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=
=3D"2">After a year I have restarted work on a project using Postgresq=
l. The database I created was in Postgresql 8.2.5. I updated my database se=
rver from Ubuntu 7.10 to 10.4 (lucid)  and installed Postgresql 9.0.2 =
The Postgresql install went fine and the restore from my previous pg_dumpal=
l went fine but I have an issue with the backup script.I have made =
the pgpass file as root but I cannot get the backup script to run as root I=
 must change to a postgresql/ubuntu user engineering and then the script ru=
ns. Previously the backup script ran from cron.daily . I need to know what =
I am not doing correctly for this to work. I do not have much scripting exp=
erience. The error message is root@claLinus:/# source /etc/cron=
.daily/postgresql-backup.shpg_dumpall: could not connect to database "t=
emplate1": FATAL:  Ident authentication failed for user "engineering"<=
br>I have confirmed that .pgpass exists root@claLinus:/=
# locate .pgpass/home/engineering/.pgpass/home/mmg/.pgpass/root=
/.pgpass<font face=3D"Default Sans Serif,Verdana,Arial,Helvet=
ica,sans-serif" size=3D"2">Below is my backup script and my instructions fo=
r creating the pgpass that came from this list several years ago</f=
ont>Thank you for any help.Margaret <font fac=
e=3D"Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size=3D"2">***&=
nbsp;*** *** *** *** *** *** *** ***&nbs=
p;*** *** *** *** *** *** *** *** *=
** *** ***#!/bin/bash#file is /etc/cron.dai=
ly/postgresql-backup.sh#store the file name into a variablenumdate=
=3D$(date +%F)-$(date +%k%M)owl.sql#remove spaces from the file name<br=
>numdate=3D${numdate/ /}#backup the databasepg_dumpall -U engineeri=
ng --column-inserts --attribute-inserts  > /tmp/$numdate# recor=
d in the log it was doneecho $(date) PID $$ backup completed >> /=
var/log/messages#ftp the fileftp -inv 192.168.100.29<<ENDFTP<=
br>user backupftp passwordcd ./backupLinus/lcd /tmpput $numdate=
byeENDFTP<font face=3D"Default Sans Serif,Verdana,Arial,Hel=
vetica,sans-serif" size=3D"2"><font face=3D"Default Sans Serif,Verdan=
a,Arial,Helvetica,sans-serif" size=3D"2">*** *** *** ***&nbs=
p;*** *** *** *** *** *** *** *** *=
** *** *** *** *** *** *** ***#instr=
uctions for making the .pgpass filetouch ~/.pgpasschmod 0600 ~/=
.pgpassecho '*:*:*:username:password' > ~/.pgpassNote that this =
presumes you are logged in as the user who will be dumping the database(s).=
"This e-mail messa=
ge and any attachment(s) are for the sole use of the intended recipient(s) =
and may contain company proprietary, privileged or confidential information=
.   If you are not the intended recipient(s), please contact the sender by =
reply e-mail, advise them of the error and destroy this message and its att=
achments as well as any copies. The review, use or distribution of this mes=
sage or its content by anyone other than the intended recipient or senior m=
anagement of the company is strictly prohibited."

В списке pgsql-general по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Constraint exclusion with box and integer
Следующее
От: John R Pierce
Дата:
Сообщение: Re: pg_dumpall backup script w. ftp ; pgpass file ; after upgrade to Ubuntu 10.4 (lucid) and Postgresql 9.0.2