Re: Cold backup with rsync -- WAL files?

From: Craig James <cjames(at)emolecules(dot)com>
To: Payal Singh <payal(at)omniti(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Cold backup with rsync -- WAL files?
Date: 2013-12-06 19:04:49
Message-ID: CAFwQ8rd9Wo7a6HqviP04dyhr0h9A1Fb-comPkxxzpuoi0NXC_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Dec 6, 2013 at 10:54 AM, Payal Singh <payal(at)omniti(dot)com> wrote:

> Not sure how/why you didn't get my reply:
>
> If your offsite backup server has enough space to accommodate all backups
> that your retention period requires, backing up WAL archives is always a
> good idea as it could not only help you restore the standalone database,
> but also allow you to set up a slave if need be.
>
> Another way to think about it would be a backup without WAL files would be
> ideally just a base backup, while the one with WAL files will give you
> point in time recovery. It all depends on what you want your backups to be
> used for.
>

Thanks, I did get your reply, but it didn't answer my question. I don't
want anything but a single point-in-time snapshot of a stopped database. (I
have good reasons for this decision.)

After I rsync the postgres data directory, do I need the WAL files from the
source (they're on a separate disk, not part of the postgres data
directory)? Can/should I erase the WAL directory of the destination?

Thanks,
Craig

>
> Payal Singh,
> OmniTi Computer Consulting Inc.
> Junior Database Architect,
> Phone: 240.646.0770 x 253
>
>
> On Fri, Dec 6, 2013 at 1:39 PM, Craig James <cjames(at)emolecules(dot)com> wrote:
>
>> While I appreciate suggestions of other ways to do replication, does
>> anyone have an answer to my original question?
>>
>> ...The procedure I'd like to implement is:
>>
>> server B is always "cold" (Postgres not running)
>> while A is running, rsync A --> B
>> stop Postgres on A
>> rsync A --> B
>> restart Postgres on A
>>
>> My question is: what about the WAL files? Do I need to rsync them from A
>> to B too, or can/should I just clean out B's WAL directory, or something
>> else?
>>
>> Thanks,
>> Craig
>>
>>
>>
>>
>>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Frost 2013-12-06 19:34:05 Re: Cold backup with rsync -- WAL files?
Previous Message Payal Singh 2013-12-06 18:54:10 Re: Cold backup with rsync -- WAL files?