You can choose
- plain python package
dump-psql-roles-grantsthat requireslibpqsystem library - or package
dump-psql-roles-grants[binary]that have binaries included
pipx install 'dump-psql-roles-grants[binary]'
dump_psql_roles_grants --helpbrew install rgeraskin/homebrew/dump-psql-roles-grants
dump_psql_roles_grants --helppip install 'dump-psql-roles-grants[binary]'
python -m dump_psql_roles_grants --helpdocker pull rgeraskin/dump_psql_roles_grants
docker run --name dump_psql_roles_grants --rm rgeraskin/dump_psql_roles_grants --help-
Generate an example config file
dump_psql_roles_grants gen-example-config -o config.yaml -
Place instances connection info to
_inputsdir_inputs/ ├── dev.yaml ├── prod.yaml ├── stage.yaml └── test.yaml
File format: yaml or json
<INSTANCE NAME 1>: dbname: <DB TO CONNECT> host: <INSTANCE HOSTNAME> password: <PASSWORD> user: <USER NAME> <INSTANCE NAME X>: dbname: <DB TO CONNECT> host: <INSTANCE HOSTNAME> password: <PASSWORD> user: <USER NAME>
-
Review
config.yaml -
Run
dump_psql_roles_grants --help