Re: pg_basebackup application does not dump all database objects

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Kristjan Mustkivi <sonicmonkey(at)gmail(dot)com>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: pg_basebackup application does not dump all database objects
Date: 2023-05-19 13:12:56
Message-ID: ZGd12D+wYDAMTgU9@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Greetings,

Please don't top-post on these lists.

* Kristjan Mustkivi (sonicmonkey(at)gmail(dot)com) wrote:
> Thank you very much for the feedback and a reference! I was under the
> impression that pg_basebackup does everything
> pg_start_backup/pg_stop_backup but with a more user-friendly manner
> and additional steps. But they are then functionally different. For my
> particular case the pg_start_backup/pg_stop_backup approach was better
> as it retained the replication slots as well (the end goal was to move
> the db from old hardware to the new one and have it on the new hw
> exactly as it was on the old one). So I was surprised that
> pg_basebackup did not bring the rep slots along.

pg_basebackup does effectively call pg_start_backup/pg_stop_backup (or
pg_backup_start/pg_backup_stop in newer versions of PG..) and is more
user-friendly and does do the additional steps expected of a low level
backup- and which are documented in the link that I sent you.

Again, it's not enough to just call pg_start_backup and pg_stop_backup
and do a 'cp -a', and that's why pg_basebackup does more than that and
also why we document those other steps for anyone interested in writing
their own backup tool.

Perhaps an argument can be made that replication slots should be
optional for pg_basebackup to include or not (and similarily for other
PG backup tools which use the low-level API).

Thanks,

Stephen

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Kristjan Mustkivi 2023-05-19 13:42:33 Re: pg_basebackup application does not dump all database objects
Previous Message Kristjan Mustkivi 2023-05-19 12:21:22 Re: pg_basebackup application does not dump all database objects