Re: where should I stick that backup?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: where should I stick that backup?
Дата
Msg-id CA+TgmoZ2cMcTPV07zZNoCBZrQkP+6M+t0+2noivF7LNhE1XGrw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: where should I stick that backup?  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: where should I stick that backup?
Список pgsql-hackers
On Mon, Apr 6, 2020 at 2:23 PM Stephen Frost <sfrost@snowman.net> wrote:
> So, instead of talking about 'bzip2 > %f.bz2', and then writing into our
> documentation that that's how this feature can be used, what about
> proposing something that would actually work reliably with this
> interface?  Which properly fsync's everything, has good retry logic for
> when failures happen, is able to actually detect when a failure
> happened, how to restore from a backup taken this way, and it'd probably
> be good to show how pg_verifybackup could be used to make sure the
> backup is actually correct and valid too.

I don't really understand the problem here.  Suppose I do:

mkdir ~/my-brand-new-empty-directory
cd ~/my-brand-new-empty-directory
pg_basebackup -Ft --pipe-output 'bzip2 > %f.bz2'
initdb -S --dont-expect-that-this-is-a-data-directory . # because
right now it would complain about pg_wal and pg_tblspc being missing

I think if all that works, my backup should be good and durably on
disk. If it's not, then either pg_basebackup or bzip2 or initdb didn't
report errors that they should have reported. If you're worried about
that, say because you suspect those programs are buggy or because you
think the kernel may not be reporting errors properly, you can use tar
-jxvf + pg_validatebackup to check.

What *exactly* do you think can go wrong here?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: [PATCH] Incremental sort (was: PoC: Partial sort)