pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
vacuum and database backup
2+ messages / 2 participants
[nested] [flat]

* vacuum and database backup
@ 2007-08-21 20:44  Bolotov Pavel <bpavel@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Bolotov Pavel @ 2007-08-21 20:44 UTC (permalink / raw)
  To: pgsql-admin

Hi

How can i setup vacuum and database backup
from crontab on ubuntu.
The problem is that both programs ask password.

Could you send an example script.

Thanks
Pavel.



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: vacuum and database backup
@ 2007-08-21 21:44  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Bolotov Pavel <bpavel@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Scott Marlowe @ 2007-08-21 21:44 UTC (permalink / raw)
  To: Bolotov Pavel <bpavel@yahoo.com>; +Cc: pgsql-admin

On 8/21/07, Bolotov Pavel <bpavel@yahoo.com> wrote:
> Hi
>
> How can i setup vacuum and database backup
> from crontab on ubuntu.
> The problem is that both programs ask password.
>
> Could you send an example script.

All you need is a .pgpass file for the account running the backups.
(or trust for that account or identd if it's on the same machine)

Using .pgpass with a line like this:

dbmachinename:5432:dbname:postgres:password

in say, the postgres user's home directory, and set to 0600
permissions, pg_dump could backup the db named dbname on the machine
dbmachinename as the user postgres with the password password.

All that's left is cronning it up.  You might have to set a home dir
in crontab at the top:

 HOME=/home/postgres



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-08-21 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-21 20:44 vacuum and database backup Bolotov Pavel <bpavel@yahoo.com>
2007-08-21 21:44 ` Scott Marlowe <scott.marlowe@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox