pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedMy Pgbackrest Backups Take Up Too Much Space
3+ messages / 3 participants
[nested] [flat]
* My Pgbackrest Backups Take Up Too Much Space
@ 2025-02-18 12:17 Abdullah Ergin <abdullaherginwork@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Abdullah Ergin @ 2025-02-18 12:17 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Hi,
I have a 9.3 TB database. And when I take a full backup, the space it
occupies in the repo is 8.7 TB. This compression is not enough for me. It
needs to be compressed more, I did not enter any parameters on my backup
server for compression, so it compresses with default parameters (gz).
Normally gz compresses well, why is there so little compression?
Also my archive files, the two days archive file of my stanza is now 744GB.
I understand that my old archive files are not deleted after my incr
backup. Wouldn't my old archive files be redundant after my incremental
backups, wouldn't it be better to delete them? What is the parameter to
ensure deletion?
*backup info:*
* full backup: 20250215-000009F timestamp start/stop:
2025-02-15 00:00:09+03 / 2025-02-16 03:12:36+03 wal start/stop:
0000000200001FC90000008B / 0000000200001FCF00000061 database
size: 9375.6GB, database backup size: 9375.6GB repo1: backup
size: 8754.4GB incr backup: 20250215-000009F_20250217-020004I
timestamp start/stop: 2025-02-17 02:00:04+03 / 2025-02-17 04:10:25+03
wal start/stop: 000000020000207700000090 /
0000000200002077000000A5 database size: 9392.0GB, database
backup size: 897.7GB repo1: backup size: 712.7GB
backup reference total: 1 full incr backup:
20250215-000009F_20250218-020005I timestamp start/stop:
2025-02-18 02:00:05+03 / 2025-02-18 02:14:59+03 wal start/stop:
0000000200002087000000F8 / 000000020000208800000008 database
size: 9419.4GB, database backup size: 364.8GB repo1: backup
size: 54.4GB backup reference total: 1 full, 1 incr*
As you can see here, there is a noticeable difference only in the last incr
backup.
*This is how much space my archive file takes up:*
*744G main_stanza*
*Backup config parameters:backup
host:[global]repo1-bundle=yrepo1-block=yrepo1-path=/mnt/dbbackuprepo1-retention-full=1process-max=4start-fast=ylog-level-console=infolog-level-file=info*
*[main_stanza]pg1-host=masterpg1-path=/mnt/postgres/13/datapg1-port=5432master
host:[global]log-level-file=inforepo1-host=backupstart-fast=yarchive-async=yprocess-max=2spool-path
=
/var/spool/pgbackrest[main_stanza]pg1-path=/mnt/postgres/13/datapg1-port=5432*
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: My Pgbackrest Backups Take Up Too Much Space
@ 2025-02-18 14:41 Ron Johnson <ronljohnsonjr@gmail.com>
parent: Abdullah Ergin <abdullaherginwork@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ron Johnson @ 2025-02-18 14:41 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Tue, Feb 18, 2025 at 7:17 AM Abdullah Ergin <abdullaherginwork@gmail.com>
wrote:
> Hi,
> I have a 9.3 TB database. And when I take a full backup, the space it
> occupies in the repo is 8.7 TB. This compression is not enough for me. It
> needs to be compressed more, I did not enter any parameters on my backup
> server for compression, so it compresses with default parameters (gz).
> Normally gz compresses well, why is there so little compression?
>
Is your data very compressible?
Are you sure the backups are being compressed?
> Also my archive files, the two days archive file of my stanza is now
> 744GB. I understand that my old archive files are not deleted after my incr
> backup. Wouldn't my old archive files be redundant after my incremental
> backups, wouldn't it be better to delete them?
>
Not if you ever need to restore to a PIT somewhere in the middle of the day.
And there's always open transactions which might be open when you start
pgbackrest.
> What is the parameter to ensure deletion?
>
There isn't one, since it's a bad idea.
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: My Pgbackrest Backups Take Up Too Much Space
@ 2025-02-18 15:19 rams nalabolu <ramsveeru441@gmail.com>
parent: Abdullah Ergin <abdullaherginwork@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: rams nalabolu @ 2025-02-18 15:19 UTC (permalink / raw)
To: Abdullah Ergin <abdullaherginwork@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org
Under global parameters section you can add
- compress-type - determines the compression algorithm used by the backup
and archive-push commands. The default is gz (Gzip) but zst (Zstandard)
is recommended because it is much faster and provides compression similar
to gz. zst has been supported by the compress-type option since v2.27
<https://pgbackrest.org/release.html#2.27;. See Compress Type
<https://pgbackrest.org/configuration.html#section-general/option-compress-type;
for
more details.
Default it will install LZ4
And you can add compression_level=3 or based on your need.
To delete backups there is another option
Repo-retention-diff or repo-retention-full
Thanks
On Tue, Feb 18, 2025 at 6:17 AM Abdullah Ergin <abdullaherginwork@gmail.com>
wrote:
> Hi,
> I have a 9.3 TB database. And when I take a full backup, the space it
> occupies in the repo is 8.7 TB. This compression is not enough for me. It
> needs to be compressed more, I did not enter any parameters on my backup
> server for compression, so it compresses with default parameters (gz).
> Normally gz compresses well, why is there so little compression?
>
> Also my archive files, the two days archive file of my stanza is now
> 744GB. I understand that my old archive files are not deleted after my incr
> backup. Wouldn't my old archive files be redundant after my incremental
> backups, wouldn't it be better to delete them? What is the parameter to
> ensure deletion?
>
> *backup info:*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * full backup: 20250215-000009F timestamp start/stop:
> 2025-02-15 00:00:09+03 / 2025-02-16 03:12:36+03 wal start/stop:
> 0000000200001FC90000008B / 0000000200001FCF00000061 database
> size: 9375.6GB, database backup size: 9375.6GB repo1: backup
> size: 8754.4GB incr backup: 20250215-000009F_20250217-020004I
> timestamp start/stop: 2025-02-17 02:00:04+03 / 2025-02-17 04:10:25+03
> wal start/stop: 000000020000207700000090 /
> 0000000200002077000000A5 database size: 9392.0GB, database
> backup size: 897.7GB repo1: backup size: 712.7GB
> backup reference total: 1 full incr backup:
> 20250215-000009F_20250218-020005I timestamp start/stop:
> 2025-02-18 02:00:05+03 / 2025-02-18 02:14:59+03 wal start/stop:
> 0000000200002087000000F8 / 000000020000208800000008 database
> size: 9419.4GB, database backup size: 364.8GB repo1: backup
> size: 54.4GB backup reference total: 1 full, 1 incr*
>
> As you can see here, there is a noticeable difference only in the last
> incr backup.
>
> *This is how much space my archive file takes up:*
> *744G main_stanza*
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Backup config parameters:backup
> host:[global]repo1-bundle=yrepo1-block=yrepo1-path=/mnt/dbbackuprepo1-retention-full=1process-max=4start-fast=ylog-level-console=infolog-level-file=info*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *[main_stanza]pg1-host=masterpg1-path=/mnt/postgres/13/datapg1-port=5432master
> host:[global]log-level-file=inforepo1-host=backupstart-fast=yarchive-async=yprocess-max=2spool-path
> =
> /var/spool/pgbackrest[main_stanza]pg1-path=/mnt/postgres/13/datapg1-port=5432*
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-02-18 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-18 12:17 My Pgbackrest Backups Take Up Too Much Space Abdullah Ergin <abdullaherginwork@gmail.com>
2025-02-18 14:41 ` Ron Johnson <ronljohnsonjr@gmail.com>
2025-02-18 15:19 ` rams nalabolu <ramsveeru441@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox