Skip to content

Instantly share code, notes, and snippets.

@kenvac
Last active February 13, 2020 12:55
Show Gist options
  • Save kenvac/620046de8549e9bfe212d093570fa22a to your computer and use it in GitHub Desktop.
Save kenvac/620046de8549e9bfe212d093570fa22a to your computer and use it in GitHub Desktop.
Export PG roles to new database
# Debian console command
$ sudo su postgres
$ pg_dumpall -v --globals-only -f "/path/to/useraccts.sql"
# Restore command
$ psql -h localhost -d postgres -U postgres -f "/path/to/useraccts.sql"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment