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

Поиск
Список
Период
Сортировка
От hvjunk
Тема [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot
Дата
Msg-id E8A5F096-3D0F-41D5-8356-81C9FB3C3EE7@gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] pg_start/stop_backup non-exclusive scripts to snapshot
Список pgsql-general
Hi there,

 I’ve previously done ZFS snapshot backups like this:

psql -c “select pg_start_backup(‘snapshot’);”
zfs snapshot TANK/postgresql@`date ‘+%Ymd’`
psql -c “select * from  pg_stop_backup();”

Reading the PostgreSQL9.6 documentation, the advice/future is to use the non-exclusive method, where I’ll need to keep
asession *open* while the snapshot takes place, and after that I’ll have to issue the pg_stop_backup(false); in that
activeconnection that issued the pg_start_backup(‘backup’,false,false); 

How is this done inside a shell script?
Especially how to do error checking from the commands as psql -c “select pg_start_backup{‘test’,false,false);” not
goingto work? 

Hendrik

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [SPAM] Re: [GENERAL] Invalid field size
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: [GENERAL] Invalid field size