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