patternMinor
Dump roles on AWS without pg_dumpall -g access (postgresql 9.6.8)?
Viewed 0 times
postgresqldumpwithoutrolespg_dumpallawsaccess
Problem
We have a system on AWS RDS Aurora, PostgreSQL v 9.6.8 option.
We are trying to move its roles to a new encrypted 10.5 instance, but we don't have superuser access that's required to do pg_dumpall -g on the old instance. (I am aware of the update to Postgres 10.0 that lets you do this without superuser access, but this is 9.6.8).
Any ideas for a workaround? Thanks in advance for any suggestions whatsoever!
We are trying to move its roles to a new encrypted 10.5 instance, but we don't have superuser access that's required to do pg_dumpall -g on the old instance. (I am aware of the update to Postgres 10.0 that lets you do this without superuser access, but this is 9.6.8).
Any ideas for a workaround? Thanks in advance for any suggestions whatsoever!
Solution
It turns out the 10.0 solution was backported (apparently) to 9.6.8, so:
Then run roles.sql against the new database.
pg_dumpall --host --globals-only --no-role-passwords \
--username masteruser >roles.sqlThen run roles.sql against the new database.
Code Snippets
pg_dumpall --host <aws_endpoint> --globals-only --no-role-passwords \
--username masteruser >roles.sqlContext
StackExchange Database Administrators Q#229549, answer score: 4
Revisions (0)
No revisions yet.