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 1iasar-0007ph-Ld for pgsql-general@arkaria.postgresql.org; Sat, 30 Nov 2019 02:34:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iasaq-0006Xq-Ee for pgsql-general@arkaria.postgresql.org; Sat, 30 Nov 2019 02:34:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iasaq-0006Xg-3z for pgsql-general@lists.postgresql.org; Sat, 30 Nov 2019 02:34:44 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iasaj-0001v3-4r for pgsql-general@postgresql.org; Sat, 30 Nov 2019 02:34:43 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7C42B2015D; Fri, 29 Nov 2019 21:34:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 29 Nov 2019 21:34:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=l/TvBjzL78Cip+J9Mj1n+1ZvfE/ WlokbeHoamZ83jR8=; b=IO/l28C1rKNbEDG7SaEX4hUYDFuAvCwXIkoRJLwUU8z 4VxfyW7v//k+VTdnMtCDNRu+E4AlHC4zBIVLG/PHpYLWXFA46Bv5+R2c+p8flZOA Jp4Hy6CisCcPIyJ8Z8KTcDGIVEAj0sUpUrf38/sMUc3kGHcE6b0KW8znlMWZKZRu DHTOQj7fm3pa6IsKywdQqDvWWwc+BitlwgN62s0BMDoGhPn9GYz8L5KKsq/+Wltw W7TY7iP++NVj6PlDs/xvwQXe8dlVXkkyWvdLCXXnoquPjUV3jpoCr80uv96Cv+dY Md2J7hgD0oCfcHNQ2cicNsWXPBm27f2j6iMFEbIiLgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=l/TvBj zL78Cip+J9Mj1n+1ZvfE/WlokbeHoamZ83jR8=; b=Fp3zWgePBQcJhf4UshUeJT rLfJPdiXjgP64BDS47byz36lmjOJbNhQknnD8vXwv8xdcPNVJPqFDT4j80igYn5Z YcbiuHlgi9+tA87vC3j9nkH1Ctvk6Zc6uPDUzgJPy7Q9cy4anRbySIPWHbdQtABZ AWY9gb3bPx2LHIEzYOlNrc0WpKsYK6DulSE5/0N1md5DD6qu5i7nJ/IGC7/G7R39 87USdqgEsxlPIuRGs2mXYhAaF3EOTNY7GVvnxi8fWAHuipjBEcyVDWF/j6EdqmG7 undaIDT8DV0w1S2H2ZJ+C00sIBClWJ3TgMl9zie9ZcT1Hpa/VllqSNA64WCrFZog == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudejtddggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfeehmdenucfjughrpeffhf fvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucffohhmrghinhepph hoshhtghhrvghsqhhlrdhorhhgnecukfhppeduudekrddvgedurddvhedtrdduudejnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiine cuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (mp76f1fa75.ap.nuro.jp [118.241.250.117]) by mail.messagingengine.com (Postfix) with ESMTPA id 77D1A30601EB; Fri, 29 Nov 2019 21:34:33 -0500 (EST) Date: Sat, 30 Nov 2019 11:34:30 +0900 From: Michael Paquier To: Christopher Pereira Cc: pgsql-general@postgresql.org Subject: Re: pg_basebackup + incremental base backups Message-ID: <20191130023430.GC99291@paquier.xyz> References: <514b14cb-f0b8-157b-2755-d5170ed4d24b@imatronix.cl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bKyqfOwhbdpXa4YI" Content-Disposition: inline In-Reply-To: <514b14cb-f0b8-157b-2755-d5170ed4d24b@imatronix.cl> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --bKyqfOwhbdpXa4YI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 29, 2019 at 04:57:11PM -0300, Christopher Pereira wrote: > Our stream replication slave server got out of sync so we need to base > backup again. >=20 > In case of big databases, can we do incremental backups with pg_basebacku= p? I know of two ways to define such backups, one being actually incremental and the other differential: - In the shape of a range of WAL segments, which is incremental. A full base backup is taken, and then by backing up periodically a range of WAL segments to make sure that you are able to recover up to the point you are looking for. Postgres core can help to do that by itself.=20 - Using a combination of full backups and differential backups (differential), the latter containing only (well, mostly) relation pages which have changed since the last full backup or differential backup. When restoring, you then need to merge the last full backup and one or more differential backups, followed by a replay of WAL segments up to the point you are willing to recover to. In this case some external tools offer solutions to that problem: pgBackRest and pg_rman are two I know of. Other backup solutions on top of the two cited above, like barman, all have implementations to handle the first type of incremental backup. > Is there any alternative? >=20 > Here was a proposal: https://wiki.postgresql.org/wiki/Incremental_backup Yeah, nothing has been done in uptream though in this area. That's more about differential backups. -- Michael --bKyqfOwhbdpXa4YI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl3h1TYACgkQnvQgOdby QH1Gbw/8DlfA9T4DIYChvaOhpMGjZSZ/99tWRwb1xEpkiYkNP9tK0RzJ906CqbtC hYJizmMvNAXa+Pz1HUvEKyBdvAUyuZISQyuMwrQs/YA683CLgcY136j8hqdjZK7n c5sPkUCr4SCKMW3SAOhPjZARo4XETX2fjCvszwdBaQlbLmahmew0mqCtU04DulG9 Ey1flXqe5XNbQ8JMH/I7GH004xkxVUb2V913ubITh2id3mmwQ2+hYKPBE/cTONHj OGzTUaandDOfDnPb9nusb3icN0hw+Q4fz4KrjaNXaavTLha3SxrvRJbVKXfIc7UK PSlvdxRxO6q0DvnQTmwy5MM+QungLq+RowAa6ZKFYdzR8HQDRDmWTqjCyYAFPZ0i alqmPoEL3pD6n3Oce6FEoULBPphBFKDXhEBy/m8I7WBUmDyZL7IB1Z/jza53ywCQ cVevKz6BWs1skkbRAlEI/a+4h6WGEtU/9ZsGrqPcFpGWrqkc0A6YElGEWJn2m5Cy O5JFLdHtDzY4BSuoVqonEl2QBSbK4BhNW9AGWCdqUs5jqFDi4pvCSDbM7l9D/2ek KpxRv1rmZKKaVKO80EpVVwFOLN1CsTrTgmkvrlMUN+2uCiC95pqYGFHLLGIHutvq IBtTIjQ2SJeSIKyYRTai2V6Ew+JqJes3Q0R+Cm+IL0w4zjrBuDE= =O4Ge -----END PGP SIGNATURE----- --bKyqfOwhbdpXa4YI--