Re: Locking Tables & Backup Inquiry

From: Andy Colson <andy(at)squeakycode(dot)net>
To: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Locking Tables & Backup Inquiry
Date: 2011-12-14 19:00:18
Message-ID: 4EE8F242.9080207@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/14/2011 12:54 PM, Carlos Mennens wrote:
> On Wed, Dec 14, 2011 at 1:38 PM, Andy Colson<andy(at)squeakycode(dot)net> wrote:
>> this'll run every hour.
>>
>>> 0 * * * * /usr/bin/pg_dumpall> pg_dumpall.$DATE.sql
>
> Thank you!
>
>> try:
>>
>> 0 4 * * * /usr/bin/pg_dumpall> pg_dumpall.$DATE.sql
>>
>> that'll run at 4am every day.
>
> When I run the command in my shell (not in Cron), I'm prompted for my
> login password. Should I change the permissions in pg_hba.conf and
> enable INHERIT grants on my user? Should I place this in who's Cron
> line? Postgres? Carlos? or Root?
>>
>> Watch the path's, who know's what directory is current:
>>
>> 0 4 * * * /usr/bin/pg_dumpall> /backup/pg_dumpall.$DATE.sql
>
> Yes, I always check my paths and use full paths rather than symbolic links.
>

That's up to you I guess. Assuming the crontab is running as root, you
could add a .pgpass to root's home, which should be secure enough.

-Andy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2011-12-14 19:14:07 Re: why can't my account be used at wiki.postgresql.org after having registered in www.postgresql.org?
Previous Message Carlos Mennens 2011-12-14 18:54:20 Re: Locking Tables & Backup Inquiry