Re: Online backup of PostgreSQL data.

From: Sathiyan Subramanian <sathiyan(dot)list(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "John R Pierce *EXTERN*" <pierce(at)hogranch(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Online backup of PostgreSQL data.
Date: 2015-09-18 11:49:05
Message-ID: CAFEq+jqfTmZrQAqZuFCr1RnwG32nY72NffJJck1_Ew+YP6vQXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can use pg_dump to creating a backup.

pg_dump -U db_username db_name -f file_name.dump

On Thu, Sep 17, 2015 at 1:45 PM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
wrote:

> John R Pierce wrote:
> > to copy the data directory and have it be useful you need to bracket the
> copy with calls to
> > pg_start_backup() and pg_stop_backup() .... this ensures the data files
> are coherent. this is in
> > fact what pg_basebackup does for you....
>
> I apologize for my fussiness, but this is a misconception I encounter so
> frequently
> that I have to speak up.
>
> The file system copy does not become consistent (isn't that what you
> meant?) if it
> is surrounded by pg_start_backup() and pg_stop_backup(). What happens is
> that
> a) a backup.label file is created that tells recovery where to start
> b) more WAL is generated so that all changes can be replayed safely.
>
> Yours,
> Laurenz Albe
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ioana Danes 2015-09-18 12:14:55 Re: Delete trigger
Previous Message Leif Jensen 2015-09-18 09:52:38 Re: Delete trigger