Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot

Поиск
Список
Период
Сортировка
От Melvin Davidson
Тема Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot
Дата
Msg-id CANu8Fiw8J39d6vn4=sS3OngBwto2YKt+gQEsN+kfdPg7pjusaw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot
Список pgsql-general


On Wed, Jul 5, 2017 at 10:14 AM, Stephen Frost <sfrost@snowman.net> wrote:
Greetings,

* Melvin Davidson (melvin6925@gmail.com) wrote:
> Stephen,
> >This script is a good example of why trying to take a PG backup using
> shell scripts isn't a good idea.
>
> Your criticism is noted, however, I have used it many times in the past
> with absolutely no problem. I submitted that script as a possible solution
> to the op's problem/question. If you have an alternate solution or can make
> improvements to it, then I am sure the op and I would welcome them.

Part of my concern is that such a script is unlikely to show any
problems until it comes time to do a restore- it could be failing now
due to the issues I noted previously without any obvious error being
thrown but with the resulting backup not being viable.  Hopefully that
isn't the case and ideally you're performing test restores of each
backup you take to ensure that it works.

Further, it doesn't address the OP's question, which was specifically
how to avoid using the now-deprecated exclusive backup method that the
script you posted uses.

* Michael Paquier (michael.paquier@gmail.com) wrote:
> On Wed, Jul 5, 2017 at 10:47 PM, Melvin Davidson <melvin6925@gmail.com> wrote:
> > Your criticism is noted, however, I have used it many times in the past with absolutely no problem.
>
> Plug off the server on which is stored the backup just after your
> script finishes, you have a good chance to be surprised if you try to
> restore from this backup later on.

What might be worse would be to pull the plug while the backup is
running and then try to bring the primary back online. :/  That issue is
part of why the API used in this script is now deprecated.

> > I submitted that script as a possible solution
> > to the op's problem/question. If you have an alternate solution or can make improvements to it, then I am sure the op and I would welcome them.
>
> Stephen has mentioned two of them, with hundreds of man hours spent in developing those backup tools to be robust solutions, done by
> specialists on the matter.

Right, there's little sense in trying to perfect a shell script when proper solutions exist.

Thanks!

Stephen

>Part of my concern is that such a script is unlikely to show any problems until it comes time to do a restore
As previously stated, the script was used to set up a slave and has done so successfully many times. There are subsequent scripts
that check results.

>What might be worse would be to pull the plug while the backup is running and then try to bring the primary back online.
Uh, whom would be so stupid as to do that?

>Right, there's little sense in trying to perfect a shell script when proper solutions exist.
>>It's better to create something that others criticise than to create nothing and criticise others. Go create, have fun!!

http://www.azquotes.com/quote/874849





--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: [GENERAL] Strange case of database bloat
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot