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.96) (envelope-from ) id 1vJuBJ-007dw0-1Y for pgsql-general@arkaria.postgresql.org; Fri, 14 Nov 2025 13:49:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJuBG-006Rqk-2T for pgsql-general@arkaria.postgresql.org; Fri, 14 Nov 2025 13:49:38 +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.96) (envelope-from ) id 1vJuBG-006Rqc-1N for pgsql-general@lists.postgresql.org; Fri, 14 Nov 2025 13:49:38 +0000 Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vJuBE-007j32-07 for pgsql-general@lists.postgresql.org; Fri, 14 Nov 2025 13:49:38 +0000 Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-431d65ad973so7194835ab.3 for ; Fri, 14 Nov 2025 05:49:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763128173; x=1763732973; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DOKN7j49Ozr0y8uPgrsBMoVqy7Y6gLYnu+51q7GmrPE=; b=LcYQj8P3Cb9ijnu5O2mDnq3whIZijm1ddUsbUnQ+3mBIglzoSdhPkikfqlUpHYSz3r zF+EW17xUR5esSNCScwCgJN/xlsmvYzD/0gv79OhoODtH8wZxU+uu6ucG1k6KISjvVHH CObcbVXurDLTb6xcLT5FONVfZc9m+CHiPNliZJmydZOp+1pV7nL9gxDwywQB2f4e01NF sH6q7VwcUpkFt2TT9bMsTiCUN746qfDoUdAkhn+thlQiFNe0gbKD7uf2TD16oM1sOHsJ 3DMfGEyJ5NrmmkAqmouT4iq9qp8HUNBm4JwH0Z1LnTiduoh0B3domSstCQ2xeJftZKeD 7Kqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763128173; x=1763732973; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DOKN7j49Ozr0y8uPgrsBMoVqy7Y6gLYnu+51q7GmrPE=; b=lTGkRlYrb9dgi6uAqZf9i9k20BBvbyIQsYozppsIZdHwvE+zgIHQ0wdNXSVKBUh3tF r082VVkY7ugI8AlpXKsqK8C/J+fhw3B3n/TheM6IcLhjvzfoG8+kUvinjNqbcK2NJshU 7Zf37zKPgoG02h0w89id7wrXj2Zpvncm8ueI/dR6zL8+iFJX2xtDOYWIztvJGpBweCoK oEt0/cF1wh3SjVfTrOrIbRPEUovJbvgDeti35e3Gem8RHT0gtZXPW8+OBUjbttamWNF/ PjKVTlk89FB/YHDOKTHddSN8sIkyFNb5+uGMgmix9g1uqMD4pEipe/dWBgaKXIM8p+r+ LOxA== X-Gm-Message-State: AOJu0YwUEYFxSftOerrbBF2x2Xbn7ecOrAKrBziEzYZIzbj5x/4vP9S9 ZOC3Ts5theXWiqHzFF3oNfZfnz8o8glaNP/YCd7dOhcLb6r6EzH9V15GNlgjfCLM4NG/MTXNZ0s e4yPD/zTprewLGmb+muP8lpjyqnIDxO8= X-Gm-Gg: ASbGncuIFeNcS8RYBHgyDwLe/4vv0oSP8/GvDNwUImpZES6iXAMvpKBlTSlPrCafhXR IbZs3jw46u9yDw4GkRJmGBqZQJOBU5JH+iRej/psgwR+ln9U+gcHHoLcG3JZ2uZp2lOzTvs0Aq2 81CEmPAzuxAnkYj0r4OvRKZllt0Juv5b9KL/40NohvnA1gRFMkmHP1FIG7WEVghE8psn1hyUN7D YJ4P/nzYvb/bSOEBkb0dPHrJY+bHIBTL1slRTBviRf7DlcUIvzcjs5LfRJh9hbqSJ3PG5rbPb6Z j4vftLTxevbWVdQPpsFAXeo4wK8r X-Google-Smtp-Source: AGHT+IEcpCEqF4a3qRGQuLRq0R5exyDtJi0yGD42hPN4XpG+b2ni46JK/P+R+XkwNwmeaOdBZ0/ap1WMw6MJr1/kxcw= X-Received: by 2002:a05:6e02:310a:b0:433:7e03:3ec7 with SMTP id e9e14a558f8ab-4348c800d32mr49467415ab.0.1763128173164; Fri, 14 Nov 2025 05:49:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Fri, 14 Nov 2025 08:48:57 -0500 X-Gm-Features: AWmQ_bn4WHGaF_aOwXjZe0rF9nkv4vkAZPS5K3HOLIKnaSS_Q_5EyplXPiR5lIg Message-ID: Subject: Re: Pgbackrest info output interpretation To: KK CHN Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000747d2006438e4482" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000747d2006438e4482 Content-Type: text/plain; charset="UTF-8" The "database size" is going to be your data directory, MINUS your pg_wal directory, MINUS unlogged/temp relations, and MINUS things that are not needed for recovery (i.e. all the small pg_ directories such as pg_subtrans). The "database backup size" is how much of that 3GB is part of *this* backup - for a full backup, the number will be the same, for diff or incr, it will be a lot less. The "repo backup size" on the last line is the compressed size of the previous "database backup size" How to correlate the pgbackrest ( info) database size, database backup size > and repo1 backup size and actual du output on DB cluster. > You cannot, really, without deep knowledge of things like which files on disk map back to unlogged tables. However, du on the datadir minus all pg_ dirs should get you in the ballpark. As a quick example: cd $DATADIR du --summarize * | awk '!/pg_/{x=x+$1}END{print x}' | numfmt --to=iec Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --000000000000747d2006438e4482 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The "database size" is going to= be your data directory, MINUS your pg_wal directory, MINUS unlogged/temp r= elations, and MINUS things=C2=A0that are not needed for recovery (i.e. all = the small pg_ directories such as pg_subtrans). The "database backup s= ize" is how much of that 3GB is part of *this* backup - for a full bac= kup, the number will be the same, for diff or incr, it will be a lot less. = The "repo backup size" on the last line is the compressed size of= the previous "database backup size"

How to correlate the pgbackrest ( inf= o) database size, database backup size and repo1 backup size =C2=A0 =C2=A0 = and actual du output on DB cluster.=C2=A0

=
You cannot, really, without deep knowledge of things like which = files on disk map back to unlogged tables. However, du on the datadir minus= all pg_ dirs should get you in the ballpark. As a quick example:

cd $DATADIR
du --summarize * | awk '!/pg_/{x= =3Dx+$1}END{print x}' | numfmt --to=3Diec=C2=A0

Cheers,
Greg

--
Enterprise Postgres Software Products & Tech Support=

--000000000000747d2006438e4482--