Re: virtualized snapshots and PITR

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PropAAS DBA <dba(at)propaas(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: virtualized snapshots and PITR
Date: 2017-12-14 15:50:54
Message-ID: CABUevEz262UDf+4_CL7VVPBGiVsj1bmiSARFPF5Mxr3hGjdgkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Dec 14, 2017 at 4:29 PM, PropAAS DBA <dba(at)propaas(dot)com> wrote:

>
>
> On 12/14/2017 01:19 AM, Laurenz Albe wrote:
>
>> PropAAS DBA wrote:
>>
>>> we have a client using veeam to do vmware snapshots of the db servers,
>>> unfortunately as far as I can tell any restore of a veeam snapshot also
>>> restores the state, which means the db gets restored in an online state.
>>> As far as I know, once the db is online we cannot force it back into
>>> recovery mode to do a PITR recovery, correct?
>>>
>>> Anyone know of a way to do PITR recoveries with veeam?
>>>
>> It is fairly simple.
>>
>> Before the snapshot, run
>>
>> SELECT pg_start_backup('label of your choice', TRUE);
>>
>> After the snapshot, run
>>
>> SELECT pg_stop_backup();
>>
>> Yours,
>> Laurenz Albe
>>
>
> However restoring the snapshot with veeam will restore the db to a
> running/online state, which means we cannot force it to go back into
> recovery mode yes?
>

If your snapshots include the memory/cpu state, then you cannot use them
for point in time recovery. It only works if what you snapshot is the disk.

If the snapshots include memory/cpu state they should be usable without the
WAL. *should* being the operative word. But not for PITR.

I don't know veeam specifically, though, so I don't know how it works
there. Unless they specifically document support for it, I wouldn't use it
for PITR under any conditions.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2017-12-15 21:15:04 Re: No stats after promoting standby?
Previous Message PropAAS DBA 2017-12-14 15:29:04 Re: virtualized snapshots and PITR