How to restore roles without changing postgres password
Andrus <kobruleht2@hot.ee>
From: "Andrus" <kobruleht2@hot.ee>
To: "pgsql-general" <pgsql-general@postgresql.org>
Date: 2020-02-11T22:26:50Z
Lists: pgsql-general, pgsql-docs
Hi! How to create backup script which restores all roles and role memberships from other server without changing postgres user password. I tried shell script PGHOST=example.com PGUSER=postgres PGPASSWORD=mypass export PGHOST PGPASSWORD PGUSER pg_dumpall --roles-only --file=globals.sql psql -f globals.sql postgres but this changes user postgres password also. How to restore roles so that postgres user password is not changed on restore. Script runs on Debian 10 with Postgres 12 Server from where it reads users runs on Debian Squeeze with Postgres 9.1 Andrus
Commits
-
Doc: fix old oversights in GRANT/REVOKE documentation.
- dce988145f7e 13.0 landed
- a56c495873c8 10.13 landed
- 804a650e4b0c 9.6.18 landed
- 736ba917f484 11.8 landed
- 2efefd28add2 12.3 landed
- 2b9d4ec1d3c0 9.5.22 landed