Re: Creating a hot copy of PostgreSQL database - Mailing list pgsql-novice

From Albe Laurenz
Subject Re: Creating a hot copy of PostgreSQL database
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17D1DD3D@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: Creating a hot copy of PostgreSQL database  (Shreesha <shreesha1988@gmail.com>)
List pgsql-novice
Shreesha wrote:
> I was wondering if pg_basebackup will be of any help for me in this regard.
> Can you please shed some light on how this can be used for recovery? Any examples(apart from the one
> in the documentation) on this usage especially with the 'xlog switch' would really help. I didn't find
> much usage examples of this utility over the internet. That's why thought of posting it here.

Yes, pg_basebackup will help.
Your script would call pg_basebackup with the -x flag so that you get a copy
of the database cluster that is ready for recovery (i.e., it contains all the
necessary WAL segments).

The server can then be started, and after recovery is completed, it will be
ready for operation. Do *not* remove the backup_label file before you start
the server.

I don't have such a script ready, but it should not be a problem.

Yours,
Laurenz Albe

pgsql-novice by date:

Previous
From: Shreesha
Date:
Subject: Re: Creating a hot copy of PostgreSQL database
Next
From: Paul Linehan
Date:
Subject: Re: Help with a JOIN.