From: | rams nalabolu <ramsveeru441(at)gmail(dot)com> |
---|---|
To: | Abdullah Ergin <abdullaherginwork(at)gmail(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: My Pgbackrest Backups Take Up Too Much Space |
Date: | 2025-02-18 15:19:25 |
Message-ID: | CAHq7gtCHy0OrNhbhU1NhxZZqQ5CxzcF5jiNxjAeWrGnkG-H+1A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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(at)gmail(dot)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*
>
From | Date | Subject | |
---|---|---|---|
Next Message | kaido vaikla | 2025-02-18 16:59:38 | Replica and transaction |
Previous Message | Scott Ribe | 2025-02-18 15:05:12 | Re: DB slowness |