Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSy7v-00088X-Ha for pgsql-admin@arkaria.postgresql.org; Sat, 01 Dec 2018 05:47:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gSy7s-0002O3-J5 for pgsql-admin@arkaria.postgresql.org; Sat, 01 Dec 2018 05:47:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSy7s-0002Nv-7p for pgsql-admin@lists.postgresql.org; Sat, 01 Dec 2018 05:47:36 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gSy7o-0005VL-10 for pgsql-admin@lists.postgresql.org; Sat, 01 Dec 2018 05:47:34 +0000 Received: from hercules.internal.net (hercules.internal.net [10.9.200.8]) by hermes.gatewaynet.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id wB15lJbL008390 for ; Sat, 1 Dec 2018 07:47:19 +0200 Received: from [10.9.251.5] (dcmchgw.internal.net [10.9.0.1]) by hercules.internal.net (Postfix) with ESMTPS id 7162B1350A22 for ; Sat, 1 Dec 2018 07:47:18 +0200 (EET) Subject: Re: Backup solution over unreliable network To: pgsql-admin@lists.postgresql.org References: <20801752-C311-4F70-9D03-08C5E711645C@mac.com> <9956da38-bcb6-6768-d245-887df9e0fb93@matrix.gatewaynet.com> From: Achilleas Mantzios Message-ID: <7f4ab880-d449-19bb-a74e-30ace2f42a49@matrix.gatewaynet.com> Date: Sat, 1 Dec 2018 07:47:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: clamav-milter 0.98.7 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-15.9 required=5.0 tests=ALL_TRUSTED,DYN_HAM_IT, DYN_HAM_SIGNAT1,TW_PG autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/12/18 1:12 π.μ., David Steele wrote: > On 11/30/18 1:49 PM, Achilleas Mantzios wrote: >> On 30/11/18 8:22 μ.μ., Evan Bauer wrote: >>> Achilleas, >>> >>> I may be over-simplifying your situation, but have you considered >>> breaking the problem into two pieces?  First backing up to a local >>> drive and then using rsync to move those files over the unreliable >>> network to the remote site. >>> >>> Like other who have responded, I can heartily recommend pgbackrest. >>> But if the network stinks, then I’d break the problem in two and leave >>> PostgreSQL out of the network equation. >> Pretty good idea, but : >> >> 1) those rsync transfers have to be somehow db aware, otherwise lots of >> things might break, checksums, order of WALs, etc. There would be the >> need to write a whole solution and end up ... getting one of the >> established solutions > It's actually perfectly OK to rsync a pgBackRest repository. We've > already done the hard work of interacting with the database and gotten > the backups into a format that can be rsync'd, backed up to tape, with > standard enterprise backups tools, etc. > > It is common to backup the pgBackRest repo or individual backups (with > --archive-copy enabled) and we have not seen any issues. > > BTW, in this context I expect local means in the same data center, not > on the database host. Great info! > >> 2) the rsync part would go basically unattended, meaning no smart >> software would be taking care of it, monitoring it, sending alerts, etc. >> Also we had our issues with rsync in the past with unreliable networks >> like getting error messages for which google returns one or no results >> (no pgsql stuff, just system scripts) . No wonder more and more PgSQL >> backup solutions move away from rsync. > I agree that this is a concern -- every process needs to be monitored > and if you can avoid the extra step that would be best. But if things > start getting complicated it might be the simpler option. All well noted! Thank you! > > Regards,