Re: [GENERAL] Backup Database Question

2011-10-06 Thread Adrian Klaver
On Thursday, October 06, 2011 7:49:38 am Carlos Mennens wrote: > So I'm looking to start regularly backing up my production database at > work. I'm tired of doing it manually every day before I go home. I use > the built in 'pg_dump' or 'pg_dumpall' utilities however I don't know > which is more be

Re: [GENERAL] Backup Database Question

2011-10-06 Thread Samba
what about pg_rman ? - On Fri, Oct 7, 2011 at 1:20 AM, Raymond O'Donnell wrote: > On 06/10/2011 20:18, Carlos Mennens wrote: > > O

Re: [GENERAL] Backup Database Question

2011-10-06 Thread Raymond O'Donnell
On 06/10/2011 20:18, Carlos Mennens wrote: > On Thu, Oct 6, 2011 at 3:12 PM, John R Pierce wrote: >> /path/to/pg_dumpall | gzip > /path/to/pgbackup-$(date -I).sql.gz > > Thanks John. I've never written a script so do I just use 'Vim' to > open a new file and just paste the following line? > >

Re: [GENERAL] Backup Database Question

2011-10-06 Thread Scott Marlowe
On Thu, Oct 6, 2011 at 1:18 PM, Carlos Mennens wrote: > On Thu, Oct 6, 2011 at 3:12 PM, John R Pierce wrote: >>   /path/to/pg_dumpall | gzip > /path/to/pgbackup-$(date -I).sql.gz > > Thanks John. I've never written a script so do I just use 'Vim' to > open a new file and just paste the following

Re: [GENERAL] Backup Database Question

2011-10-06 Thread Carlos Mennens
On Thu, Oct 6, 2011 at 3:12 PM, John R Pierce wrote: >   /path/to/pg_dumpall | gzip > /path/to/pgbackup-$(date -I).sql.gz Thanks John. I've never written a script so do I just use 'Vim' to open a new file and just paste the following line? #!/bin/bash /usr/bin/pg_dumpall | gzip > /var/db_backup/

Re: [GENERAL] Backup Database Question

2011-10-06 Thread John R Pierce
On 10/06/11 8:26 AM, Carlos Mennens wrote: Yes I agree but I didn't know enough about PostgreSQL to make that determination. Seems very logical however. Does anyone know of a PostgreSQL backup script floating around the Internet for Linux systems? I found a great one for MySQL but sadly that does

Re: [GENERAL] Backup Database Question

2011-10-06 Thread Adam Cornett
I have a little bash script that is called by cron to make a backup of the db, as well as being able to pull a copy of our production db to my local machine for development. It requires that you have a .pgpass file setup to connect to your database without entering a password. On Thu, Oct 6, 2011

Re: [GENERAL] Backup Database Question

2011-10-06 Thread Carlos Mennens
On Thu, Oct 6, 2011 at 11:19 AM, Tom Lane wrote: > Use pg_dumpall.  The extra time to dump the user and database > definitions is unlikely to be noticeable, and if push comes to shove > you'll be glad you had them. Yes I agree but I didn't know enough about PostgreSQL to make that determination.

Re: [GENERAL] Backup Database Question

2011-10-06 Thread Tom Lane
Carlos Mennens writes: > So I'm looking to start regularly backing up my production database at > work. I'm tired of doing it manually every day before I go home. I use > the built in 'pg_dump' or 'pg_dumpall' utilities however I don't know > which is more beneficial for a nightly backup. Perhaps

[GENERAL] Backup Database Question

2011-10-06 Thread Carlos Mennens
So I'm looking to start regularly backing up my production database at work. I'm tired of doing it manually every day before I go home. I use the built in 'pg_dump' or 'pg_dumpall' utilities however I don't know which is more beneficial for a nightly backup. Perhaps I should be using the 'pg_dumpal