Re: copy / backup question - copying a data directory while the db is shutdown

From: Jürgen Fuchsberger <juergen(dot)fuchsberger(at)uni-graz(dot)at>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Cc: CS_DBA <cs_dba(at)consistentstate(dot)com>
Subject: Re: copy / backup question - copying a data directory while the db is shutdown
Date: 2014-03-25 07:40:00
Message-ID: 533132D0.5030305@uni-graz.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

On 03/24/2014 11:46 PM, CS_DBA wrote:
> Hi All;
>
> If I shutdown a HOT standby slave (via the -m fast command) can I then
> copy the data directory to a "backup" location and be guaranteed that
> the backup copy will start?

Yes, but you must also backup the WAL archive from which you are
recovering (in case you are using file based log shipping and not
streaming replication). For streaming replication I don't know if it works.

Also you should check if postgres really stopped, since on high load
even the fast option can fail to stop it. Look here on how to do this:
http://www.postgresql.org/message-id/53040588.9020803@coxinc.com
>
> For some reason I thought there were issues (or potential issues) with
> this method and a PITR based recovery approach was a better guarantee
> that the copy will start
>
>
> Thoughts?
>
Info about other options appreciated.
>
>

Best,
Juergen

--
| Jürgen Fuchsberger, M.Sc.
| Wegener Center for Climate and Global Change
| University of Graz

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message CWSSupport - Marcello Lorenzi 2014-03-25 07:56:24 R: Re: VIP Manager?
Previous Message Евгений Селявка 2014-03-25 07:30:40 Re: VIP Manager?