How to get a more RSYNC compatible output of pg_dump?

From: Thorsten Schöning <tschoening(at)am-soft(dot)de>
To: <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: How to get a more RSYNC compatible output of pg_dump?
Date: 2022-05-16 07:56:34
Message-ID: 49351195.20220516095634@am-soft.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi everyone,

for various historical reasons I maintain a database containing large
file uploads, which makes uncompressed output of pg_dump ~200 GiB in
size currently. I'm storing that dump to some NAS and am trying to
forward it from there using RSYNC to multiple different additional
offsite USB disks.

I'm doing the same with the files directory of Postgres already after
taking BTRFS snapshots etc. and for those files things work pretty
well with RSYNC. Lots of files are skipped entirely, some are slightly
updated in-place, some updates are a bit larger depending on the
actual changes and when RSYNC executed last etc.

Though, with the large dumps it seems to me that with every slight
change in the actual data the entire dump gets downloaded again. I'm
already using uncompressed dumps in the hope that the output is more
stable and RSYNC better able to recognize unchanged parts. But I guess
that most changes in the dumped data simply result in all subsequent
data being that misplaced compared to what RSYNC reads against, that
it's like downloading the whole file again in the end.

Is that simply the way it is or are there some optimizations possible
when using pg_dump? Am using Postgres 11 and don't see anything which
seems to help in this use-case.

Thanks!

Mit freundlichen Grüßen

Thorsten Schöning

--
AM-SoFT IT-Service - Bitstore Hameln GmbH
Mitglied der Bitstore Gruppe - Ihr Full-Service-Dienstleister für IT und TK

E-Mail: Thorsten(dot)Schoening(at)AM-SoFT(dot)de
Web: http://www.AM-SoFT.de/

Tel: 05151- 9468- 0
Tel: 05151- 9468-55
Fax: 05151- 9468-88
Mobil: 0178-8 9468-04

AM-SoFT IT-Service - Bitstore Hameln GmbH, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 221853 - Geschäftsführer: Janine Galonska

Für Rückfragen stehe ich Ihnen jederzeit zur Verfügung.

Mit freundlichen Grüßen,

Thorsten Schöning

Telefon: +49 (0)515 94 68 - 0
Fax:
E-Mail: TSchoening(at)am-soft(dot)de

AM-Soft IT-Service - Bitstore Hameln GmbH
Brandenburger Straße 7c
31789 Hameln

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen und ist ausschliesslich für den Adressaten bestimmt. Jeglicher Zugriff auf diese E-Mail durch andere Personen als den Adressaten ist untersagt. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, ist Ihnen jede Veröffentlichung, Vervielfältigung oder Weitergabe wie auch das Ergreifen oder Unterlassen von Massnahmen im Vertrauen auf erlangte Information untersagt.

This e-mail may contain confidential and/or privileged information and is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.

Hinweise zum Datenschutz: bitstore.group/datenschutz

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Holger Jakobs 2022-05-16 10:52:41 Re: How to get a more RSYNC compatible output of pg_dump?
Previous Message David G. Johnston 2022-05-14 21:06:56 Re: "clearing" a relation file !