Re: Creating a user for pg_start_backup

Поиск
Список
Период
Сортировка
От Andrew Beverley
Тема Re: Creating a user for pg_start_backup
Дата
Msg-id 1437468671.20338.20.camel@andybev.com
обсуждение исходный текст
Ответ на Re: Creating a user for pg_start_backup  (John R Pierce <pierce@hogranch.com>)
Ответы Re: Creating a user for pg_start_backup  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On Tue, 2015-07-21 at 01:46 -0700, John R Pierce wrote:
> On 7/21/2015 1:31 AM, Andrew Beverley wrote:
> > I had to specify a database name when connecting:
> >
> >      psql -U backup -c "select pg_start_backup('Daily backup')" -d postgres
>
> psql defaults to the current user for both the database name and user
> name.   I probably would have run that psql command as the system
> postgres user and not specified any -U or -d ...

Thanks John. The backup script is running as root, so presumably I'd have to use
sudo? Or should I run a separate cron job as postgres to do the above, and run the
backup script separately?

Thanks,

Andy



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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Creating a user for pg_start_backup
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Creating a user for pg_start_backup