Re: Creating a user for pg_start_backup

From: Andrew Beverley <andy(at)andybev(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Creating a user for pg_start_backup
Date: 2015-07-21 08:51:11
Message-ID: 1437468671.20338.20.camel@andybev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2015-07-21 10:00:13 Re: Creating a user for pg_start_backup
Previous Message John R Pierce 2015-07-21 08:46:09 Re: Creating a user for pg_start_backup