Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2z6l-0007m1-BP for pgsql-admin@arkaria.postgresql.org; Thu, 30 Dec 2021 17:20:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n2z6k-0002z6-7b for pgsql-admin@arkaria.postgresql.org; Thu, 30 Dec 2021 17:20:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2z6j-0002yx-Tw for pgsql-admin@lists.postgresql.org; Thu, 30 Dec 2021 17:20:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n2z6d-0004eY-Ae for pgsql-admin@lists.postgresql.org; Thu, 30 Dec 2021 17:20:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BUHKjKH2276565; Thu, 30 Dec 2021 12:20:46 -0500 From: Tom Lane To: Tom Korach cc: pgsql-admin@lists.postgresql.org Subject: Re: Is file system replication sufficient to recovery? In-reply-to: References: Comments: In-reply-to Tom Korach message dated "Thu, 30 Dec 2021 12:04:58 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2276563.1640884845.1@sss.pgh.pa.us> Date: Thu, 30 Dec 2021 12:20:45 -0500 Message-ID: <2276564.1640884845@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tom Korach 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