Thursday, September 4, 2014

Transfer user grants from one Postgresql instance to another

0 comments
Transferring role from one host to another:

pg_dumpall -r -h source_host |> roles. sql
psql -h destination_host -f roles.sql

Transfer role grants from one host to another

pg_dump -h source_host -s | egrep '(GRANT|REVOKE)' > grants,sql
psql -h destination_host -f grants.sql 
Continue reading →

Labels