Re: Automate pg_basebackup in linux

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Automate pg_basebackup in linux
Дата
Msg-id 20210607155634.GM20766@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Automate pg_basebackup in linux  (Ron <ronljohnsonjr@gmail.com>)
Ответы Re: Automate pg_basebackup in linux  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-admin
Greetings,

* Ron (ronljohnsonjr@gmail.com) wrote:
> On 6/5/21 12:14 PM, SMAX Inbound wrote:
> >is there any script to automate pg_basebackup in linux using cron job..
> >i.e. shell script that will automate taking basebackup weekly, and
> >removing previous backup and wal files once base backup is successfully
> >completed...
> >
>
> If you know any shell scripting languages, such a script is easy to write. 
> (Are you saying that you don't know "shell"?)

Writing a script that actually does everything correct is actually
really hard, unfortunately.  I know, I tried (and using perl too, not
just unix shell...).  Leveraging pg_basebackup makes it a bit easier as
that'll do things like properly fsync'ing the files but it doesn't do
anything for really managing WAL.

Definitely strongly recommend using existing tools which have been
developed for PostgreSQL and which handle expiration of backups and WAL.

Thanks,

Stephen

Вложения

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

Предыдущее
От:
Дата:
Сообщение: patroni recovery_min_apply_delay parameter
Следующее
От: Ron
Дата:
Сообщение: Re: Automate pg_basebackup in linux