Re: Backup Database Question

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Backup Database Question
Date: 2011-10-06 19:50:10
Message-ID: 4E8E0672.9090208@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/10/2011 20:18, Carlos Mennens wrote:
> On Thu, Oct 6, 2011 at 3:12 PM, John R Pierce <pierce(at)hogranch(dot)com> 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/pg_backup-$(date -I).sql.gz
>
> Is that all I need to do or is there more steps / data involved?

I think you also need to make it executable:

chmod u+x my_backup_script

...or something like that.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brandon Phelps 2011-10-06 19:57:00 Connection Pooling
Previous Message Scott Marlowe 2011-10-06 19:44:51 Re: Backup Database Question