Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t5X13-006kvb-5Y for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2024 21:11:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t5X11-009sI6-Gw for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2024 21:11:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t5X11-009sHy-70 for pgsql-hackers@lists.postgresql.org; Mon, 28 Oct 2024 21:11:07 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t5X0w-003Tnk-H1 for pgsql-hackers@postgresql.org; Mon, 28 Oct 2024 21:11:06 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43169902057so46317725e9.0 for ; Mon, 28 Oct 2024 14:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730149861; x=1730754661; darn=postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ehtYN88i35PrQXJsXEetyom2opt4lmC9h3AimCm6B+Y=; b=mD2dNFdGIc9bPeSg29l/oRu3X92Hgjxg2QGbjFcfArBr7HXK5rWZvL4xNkUR7VOrqU O4YS6cVE3VhNG1RA6m1gekVc/CIyOrQSM/G2GxEMKO/q27hn36Bon8Kkil5jyAe9sl5v xOBLTRx0mKrX7x9ym6PIARRGOekjv9z5AxLGFjdL55qrkJVNSxy9OS+K6uIfhLz8BW3U 5UUzB9VR7rMjYFfy9fpS6xCV3ZLhQmDiu69LnusRWYAGsVcA6TluxaTCNjLF0TYd7M+k UIci1bv76tM4SctNuPk8teBDzZOVaKq1PDMbjowc3Du2prfU0mfp3zBMgZaJS0RyJ3lZ Vgig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730149861; x=1730754661; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ehtYN88i35PrQXJsXEetyom2opt4lmC9h3AimCm6B+Y=; b=PdVB0egJha2Iq9WxpzUnc534k+srjyTj9ykZRqSkfzgyg7MDUQJIHj6OMk5rGBzcoo ROr5RczFfxMQRl9+oKgcThmtBworIo0yZL5aw8ACrhnWWqpMcihr220yl6U7zUuKfSic zQvPSif/QivWtzHWccvWXyDWYRUf10J4Zf7q8lpDp90DF7+qjPwi25otOZuG9C0Embv1 WNdTYs8rfjKVU6v6KkpQxWUuHgR91eff3NlzAQeMqcvqMLa8FZDBWWDhVDwKwKWmdske 5FX0QFTnroDvM6nh/TA7V2mD138sIXViONMA7DBv8axIbjE0EGyjx2AzE3Rb+mhoLO4K CvLQ== X-Gm-Message-State: AOJu0YyY13UlJX8K8yVUHqXBjhmPD33CEds9qgu+Am+V2bf9Bz8yjYh7 eb5fXm7yq6s/BvDBJDAoNaBZYNEaBNBAZ/K1T222yxyPcdIPw2c5 X-Google-Smtp-Source: AGHT+IEv6hzukxT9Tz61SG3OMVAxXG4Qycki9qTBoYXlV3dNlORGnaQjeFPIEVFQieXN9e/hAqCVjg== X-Received: by 2002:a05:600c:314a:b0:42f:8287:c24d with SMTP id 5b1f17b1804b1-4319acadbbemr89103265e9.21.1730149860471; Mon, 28 Oct 2024 14:11:00 -0700 (PDT) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:a49:e301:666c:78e:5e29:e70c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b712cbsm10598322f8f.77.2024.10.28.14.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 14:10:59 -0700 (PDT) Message-ID: <671ffde3.050a0220.9a66f.68e1@mx.google.com> X-Google-Original-Message-ID: <20241028211058.GA5500@caipicrew.dd-dns.de;lightning.caipicrew.dd-dns.de> Sender: Michael Banck Received: from mbanck by lightning.caipicrew.dd-dns.de with local (Exim 4.92) (envelope-from ) id 1t5X0s-0004iF-Tv; Mon, 28 Oct 2024 22:10:58 +0100 Date: Mon, 28 Oct 2024 22:10:58 +0100 From: Michael Banck To: Robert Haas Cc: "pgsql-hackers@postgresql.org" Subject: Re: trying again to get incremental backup References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, So I am a bit confused about the status of the tar format support, and after re-reading the thread (or at least grepping it for ' tar '), this wasn't really much discussed here either. On Wed, Jun 14, 2023 at 02:46:48PM -0400, Robert Haas wrote: > - We only know how to operate on directories, not tar files. I thought > about that when working on pg_verifybackup as well, but I didn't do > anything about it. It would be nice to go back and make that tool work > on tar-format backups, and this one, too. I believe "that tool" is pg_verifybackup, while "this one" is pg_combinebackup? However, what's up with pg_basebackup itself with respect to tar format incremental backups? AFAICT (see below), pg_basebackup -Ft --incremental=foo/backup_manifest happily creates an incremental backup in tar format; however, pg_combinebackup will not be able to restore it? If that is the case, shouldn't there be a bigger warning in the documentation about this, or maybe pg_basebackup should refuse to make incremental tar-format backups in the first place? Am I missing something here? It will be obvious to users after the first failure (to try to restore) that this will not work, and hopefully everybody tests a restore before they put a backup solution into production (or even better, wait until this whole feature is included in a wholesale solution), but I wonder whether somebody might trip over this after all and be unhappy. If one reads the pg_combinebackup documentation carefully it kinda becomes obvious that it does occupy itself with tar format backups, but it is not spelt out explicitly either. |postgres@mbanck-lin-1:~$ pg_basebackup -c fast -Ft -D backup/backup_full |postgres@mbanck-lin-1:~$ pg_basebackup -c fast -Ft -D backup/backup_incr_1 --incremental=backup/backup_full/backup_manifest |postgres@mbanck-lin-1:~$ echo $? |0 |postgres@mbanck-lin-1:~$ du -h backup/ |44M backup/backup_incr_1 |4,5G backup/backup_full |4,5G backup/ |postgres@mbanck-lin-1:~$ tar tf backup/backup_incr_1/base.tar | grep INCR | head |base/1/INCREMENTAL.3603 |base/1/INCREMENTAL.2187 |base/1/INCREMENTAL.13418 |base/1/INCREMENTAL.3467 |base/1/INCREMENTAL.2615_vm |base/1/INCREMENTAL.2228 |base/1/INCREMENTAL.3503 |base/1/INCREMENTAL.2659 |base/1/INCREMENTAL.2607_vm |base/1/INCREMENTAL.4164 |postgres@mbanck-lin-1:~$ /usr/lib/postgresql/17/bin/pg_combinebackup backup/backup_full/ backup/backup_incr_1/ -o backup/combined |pg_combinebackup: error: could not open file "backup/backup_incr_1//PG_VERSION": No such file or directory Michael