From: | Tom Korach <tom(at)safekeep(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Is file system replication sufficient to recovery? |
Date: | 2021-12-30 17:43:04 |
Message-ID: | CALQRbyyfjY7=z6Z8EGWj0aqPX0_Uk95v6pQkGoHbCDW=srFOGw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi,
Thanks for the quick reply. To your questions:
> What do you mean exactly by "file-system replication"?
RAID1 setup (specifically, between two disks or EBS volumes [on AWS]),
using LVM.
The two disks are synchronized, so AFAIK each should be an exact copy of
the data.
> Not as long as you capture the currently-active WAL files along with the
database contents.
I am not that familiar with Postgresql internals, but if we have a snapshot
of the file system at the time of the crash (using RAID), is there a
scenario where previous WAL segments will be needed to restore the
database?
Regards,
Tom
On Thu, Dec 30, 2021 at 12:20 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Tom Korach <tom(at)safekeep(dot)com> writes:
> > We have a Postgresql instance (0.5-4TB in size) used for development and
> > on-line reporting.
> > We do not need high-availability, but we do need:
> > 1. Quick disaster recovery (<1 hour) is important.
> > 2. Recovery from corruption of the server or mistakes.
>
> > Will file-system replication be enough to achieve this goal?
>
> What do you mean exactly by "file-system replication"? Something
> equivalent to rsync will absolutely not work against a running
> Postgres server, because it won't capture a consistent state of
> all the files. If you have (and trust) a filesystem with snapshot
> capabilities, it might work to take a filesystem snapshot and hold
> onto it long enough to rsync from the snapshot. I'm not sure about
> the reliability or performance implications of such a setup, though.
> See
>
> https://www.postgresql.org/docs/current/backup-file.html
>
> > Do we also need WAL file archiving?
>
> Not as long as you capture the currently-active WAL files along
> with the database contents.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-12-30 17:52:11 | Re: Is file system replication sufficient to recovery? |
Previous Message | Tom Lane | 2021-12-30 17:20:45 | Re: Is file system replication sufficient to recovery? |