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

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot
Дата
Msg-id 20170710225927.GQ1769@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot  (mariusz <marius@mtvk.pl>)
Список pgsql-general
Greetings,

* mariusz (marius@mtvk.pl) wrote:
> On Tue, 2017-07-04 at 17:55 -0400, Stephen Frost wrote:
> > > How is this done inside a shell script?
> >
> > Generally, it's not.  I suppose it might be possible to use '\!' with
> > psql and then have a shell snippet that looks for some file that's
> > touched when the snapshot has finished, but really, trying to perform a
> > PG backup using hacked together shell scripts isn't recommended and
> > tends to have problems.
>
> not saying to use scripts or pg tools, but if OP needs a script, may
> consider perl module IPC::Run instead of shell script - easy to use
> interacting with subprocesses over filehandles or pipes (even supports
> ptys). that way you can keep your active psql session, pass input to it,
> view and process it's output, while doesn't block you from doing other
> things meanwhile
>
> of course it's perl, not shell, but looks "scripty" and can do what OP
> wants

Sure, that's more-or-less what pgBackRest does (which is Perl, mostly).

Thanks!

Stephen

Вложения

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

Предыдущее
От: Lele Gaifax
Дата:
Сообщение: [GENERAL] Registering aggregate function for a custom domain
Следующее
От: rihad
Дата:
Сообщение: Re: [GENERAL] Changing collate & ctype for an existing database