Skip to main content

Dump Postgres Roles and Grants

Project description

Dump Postgres Roles and Grants

Install

You can choose

  • plain python package dump-psql-roles-grants that requires libpq system library
  • or package dump-psql-roles-grants[binary] that have binaries included

pipx (preferred)

pipx install 'dump-psql-roles-grants[binary]'
dump_psql_roles_grants --help

brew

brew install rgeraskin/homebrew/dump-psql-roles-grants
dump_psql_roles_grants --help

pip

pip install 'dump-psql-roles-grants[binary]'
python -m dump_psql_roles_grants --help

docker

docker pull rgeraskin/dump_psql_roles_grants
docker run --name dump_psql_roles_grants --rm rgeraskin/dump_psql_roles_grants --help

Usage

  1. Generate an example config file dump_psql_roles_grants gen-example-config -o config.yaml

  2. Place instances connection info to _inputs dir

    _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>
    
  3. Review config.yaml

  4. Run

    dump_psql_roles_grants --help
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dump_psql_roles_grants-0.3.1.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

dump_psql_roles_grants-0.3.1-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page