Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-15 Thread Albe Laurenz
Carlos Mennens wrote: >> 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

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Andy Colson
On 12/14/2011 12:54 PM, Carlos Mennens wrote: On Wed, Dec 14, 2011 at 1:38 PM, Andy Colson 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

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
On Wed, Dec 14, 2011 at 1:38 PM, Andy Colson 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),

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Andy Colson
On 12/14/2011 12:26 PM, Carlos Mennens wrote: On Wed, Dec 14, 2011 at 1:15 PM, Andy Colson wrote: Yep, you simply cron a pg_dump. (dumpall if you want users/roles and all databases). No locking needed. So how would one put this in cron if I wanted to run this everyday? 0 * * * * /usr/bin/p

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
On Wed, Dec 14, 2011 at 1:15 PM, Andy Colson wrote: > Yep, you simply cron a pg_dump.  (dumpall if you want users/roles and all > databases).  No locking needed. So how would one put this in cron if I wanted to run this everyday? 0 * * * * /usr/bin/pg_dumpall > pg_dumpall.$DATE.sql Will that wo

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Andy Colson
On 12/14/2011 11:52 AM, Carlos Mennens wrote: I'm wanted to find out why is it recommended or even an option to lock tables during a backup of a database? I've never experimented with database backups so I'm only guessing it locks / freezes the data so no changes can be made while the backup is

[GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
I'm wanted to find out why is it recommended or even an option to lock tables during a backup of a database? I've never experimented with database backups so I'm only guessing it locks / freezes the data so no changes can be made while the backup is in process, correct? Just curious and wasn't abl