Thread
-
Pgbackrest info output interpretation
KK CHN <kkchn.in@gmail.com> — 2025-11-14T08:32:38Z
Hi, I am having confusion trying to understand the database size, backupsize and repo backup size.. In my DB server I have du output as follows. /data/edb/as16 [root@db1 as16]# du -h -d 1 5.3G ./data 25G ./tablespace 30G . [root@db1 as16]# On my Repo Server pgbackest info says .... full backup: 20251114-121504F timestamp start/stop: 2025-11-14 12:15:04+05:30 / 2025-11-14 12:20:58+05:30 wal start/stop: 000000010000000500000024 / 000000010000000500000024 database size: 3GB, database backup size: 3GB repo1: backup size: 431.0MB Could someone shed some light on 431 MB and database size:3GB, database backup size : 3GB compared to the DB cluster on disk usage output ? How to correlate the pgbackrest ( info) database size, database backup size and repo1 backup size and actual du output on DB cluster. Note: I am using zst compression on pgbackrest Regards, Krishane -
Re: Pgbackrest info output interpretation
Ron <ronljohnsonjr@gmail.com> — 2025-11-14T13:42:46Z
On Fri, Nov 14, 2025 at 3:27 AM KK CHN <kkchn.in@gmail.com> wrote: > Hi, > > I am having confusion trying to understand the database size, backupsize > and repo backup size.. > > In my DB server I have du output as follows. > > /data/edb/as16 > [root@db1 as16]# du -h -d 1 > 5.3G ./data > 25G ./tablespace > 30G . > [root@db1 as16]# > > On my Repo Server pgbackest info says .... > > full backup: 20251114-121504F > timestamp start/stop: 2025-11-14 12:15:04+05:30 / 2025-11-14 > 12:20:58+05:30 > wal start/stop: 000000010000000500000024 / > 000000010000000500000024 > database size: 3GB, database backup size: 3GB > repo1: backup size: 431.0MB > > Could someone shed some light on 431 MB and database size:3GB, database > backup size : 3GB compared to the DB cluster on disk usage output ? > > How to correlate the pgbackrest ( info) database size, database backup > size and repo1 backup size and actual du output on DB cluster. > Do you have the job log at "detail" level? That lists every file which is backed up. Sadly, no compression rates. -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster!
-
Re: Pgbackrest info output interpretation
Greg Sabino Mullane <htamfids@gmail.com> — 2025-11-14T13:48:57Z
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