Re: pg_basebackup application does not dump all database objects - Mailing list pgsql-docs

From Stephen Frost
Subject Re: pg_basebackup application does not dump all database objects
Date
Msg-id ZGd12D+wYDAMTgU9@tamriel.snowman.net
Whole thread Raw
In response to Re: pg_basebackup application does not dump all database objects  (Kristjan Mustkivi <sonicmonkey@gmail.com>)
Responses Re: pg_basebackup application does not dump all database objects
List pgsql-docs
Greetings,

Please don't top-post on these lists.

* Kristjan Mustkivi (sonicmonkey@gmail.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

Attachment

pgsql-docs by date:

Previous
From: Kristjan Mustkivi
Date:
Subject: Re: pg_basebackup application does not dump all database objects
Next
From: Kristjan Mustkivi
Date:
Subject: Re: pg_basebackup application does not dump all database objects