Re: automating backup ?

Lists: pgsql-general
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>, "Andreas" <maps(dot)on(at)gmx(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: automating backup ?
Date: 2005-06-28 08:16:28
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C771C@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

> Hello.
> I created a Windows XP schedule for backup, following your
> instruction. Now I have a .bat file with this script:
>
> cd D:\Program Files\PostgreSQL\8.0\bin
> pg_dumpall >D:\MYDATABASE_DUMPALL -U postgres pg_dumpall
> >D:\MYDATABASE_SHEMA -U postgres -s pg_dumpall
> >D:\MYDATABASE_GLOBALS -U postgres -g
>
> Well, it works OK, but prompts for password every time. Is
> there any way that I pass the superuser password (off course,
> in safe way) so that it works automatically without prompting
> for password ?

Use a pgpass.conf file:
http://www.postgresql.org/docs/8.0/static/libpq-pgpass.html (remember
the file has to be in the profile of the account that executes the step.
And be sure to protect it with file system ACLs so other users can't
read it)

//Magnus


From: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>, "Andreas" <maps(dot)on(at)gmx(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: automating backup ?
Date: 2005-06-28 13:07:42
Message-ID: 003001c57be2$e1ff56c0$49331dc3@zlatko58zaczpv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi.
I can't find pgpass.conf file. It should be in Application Data
subdirectory, but there is no PostgreSQL subdirectory in Application Data
directory (!?). I couldn't find pgpass.conf even by searching the hard
disk..

Regards,
Zlatko

----- Original Message -----
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>; "Andreas" <maps(dot)on(at)gmx(dot)net>;
<pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, June 28, 2005 10:16 AM
Subject: Re: [GENERAL] automating backup ?

> Hello.
> I created a Windows XP schedule for backup, following your
> instruction. Now I have a .bat file with this script:
>
> cd D:\Program Files\PostgreSQL\8.0\bin
> pg_dumpall >D:\MYDATABASE_DUMPALL -U postgres pg_dumpall
> >D:\MYDATABASE_SHEMA -U postgres -s pg_dumpall
> >D:\MYDATABASE_GLOBALS -U postgres -g
>
> Well, it works OK, but prompts for password every time. Is
> there any way that I pass the superuser password (off course,
> in safe way) so that it works automatically without prompting
> for password ?

Use a pgpass.conf file:
http://www.postgresql.org/docs/8.0/static/libpq-pgpass.html (remember
the file has to be in the profile of the account that executes the step.
And be sure to protect it with file system ACLs so other users can't
read it)

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
Cc: "Magnus Hagander" <mha(at)sollentuna(dot)net>, "Andreas" <maps(dot)on(at)gmx(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: automating backup ?
Date: 2005-06-28 14:16:27
Message-ID: m27jge5zyc.fsf@Douglas-McNaughts-Powerbook.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> writes:

> Hi.
> I can't find pgpass.conf file. It should be in Application Data
> subdirectory, but there is no PostgreSQL subdirectory in Application
> Data directory (!?). I couldn't find pgpass.conf even by searching the
> hard disk..

I'm pretty sure it's not created by the default install (it certainly
isn't on Unix)--you need to create it yourself if you're going to use
it.

-Doug


From: Andreas <maps(dot)on(at)gmx(dot)net>
To: Zlatko Matic <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: automating backup ?
Date: 2005-06-28 14:25:26
Message-ID: 42C15DD6.2080902@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Zlatko Matic schrieb:

> I can't find pgpass.conf file. It should be in Application Data
> subdirectory, but there is no PostgreSQL subdirectory in Application
> Data directory (!?). I couldn't find pgpass.conf even by searching the
> hard disk..

you have to create the sub-dir and the file yourself