How do I create a Backup Operator account ?

2019-07-29 Thread Marcos Aurelio Nobre
Hi all.

I need to create a PostgreSQL account , that only do a Backup and Restore
operations over a PGSQL Database .

My main difficulty is to only assign Backup and Restore capability to one
user account, unlike the ability to perform DQL and DML operations for
ordinary user accounts.

In POSTGRESQL there is no backup / restore privilege because these
operations are performed by server specific utilities.

One possibility that I thought would be:

I was wondering if it was possible to configure the pgAdmin4 menus to be
available for a particular login, only Backup & Restore items. But I'm not
sure how to associate a bank login account with a specific menu setting of
a client tool.

Could someone give me any ideas or directions?


Re: How do I create a Backup Operator account ?

2019-07-30 Thread Marcos Aurelio Nobre
I've also been thinking about this possibility. Create a Linux (S.O.) user
account that has the ability to run pg_dump and pg_restore and enable this
user account to be able to connect to a database - I believe this is
possible through PG_HBA.CONF

But I don't know how to implement this on Linux, nor how to write this
entry in the pg_hba.conf file.

Em ter, 30 de jul de 2019 às 10:22, Luca Ferrari 
escreveu:

> On Tue, Jul 30, 2019 at 2:22 PM Ron  wrote:
> > Luca, it is common some large Enterprise environments to have Operations
> > staff that can run backups without being able to do anything else.  For
> > example, SQL Server has a per-database user mapping named
> db_backupoperator.
>
>
> Yes, but I think here we have to solve it with external tools, e.g.,
> sudo. I see, however, an hard time configuring an account to execute
> only pg_dump without being able to "escape" into the database itself.
>
> Luca
>
>
>