https://github.com/dalibo/pg_dumpacl
Tool for dumping database creation options
https://github.com/dalibo/pg_dumpacl
acl dump postgresql
Last synced: about 1 year ago
JSON representation
Tool for dumping database creation options
- Host: GitHub
- URL: https://github.com/dalibo/pg_dumpacl
- Owner: dalibo
- License: bsd-2-clause
- Created: 2018-01-17T10:03:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-23T14:25:43.000Z (over 5 years ago)
- Last Synced: 2025-03-27T07:51:32.685Z (about 1 year ago)
- Topics: acl, dump, postgresql
- Language: C
- Size: 46.9 KB
- Stars: 7
- Watchers: 18
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# `pg_dumpacl` [](https://circleci.com/gh/dalibo/pg_dumpacl)
A tool to dump ACL per database, based on `pg_dump`
``` console
$ ./pg_dumpacl -d db0
--
-- Database creation
--
CREATE DATABASE "db0" WITH TEMPLATE = template0 OWNER = "postgres";
REVOKE ALL ON DATABASE "db0" FROM PUBLIC;
REVOKE ALL ON DATABASE "db0" FROM "postgres";
GRANT ALL ON DATABASE "db0" TO "postgres";
GRANT CONNECT,TEMPORARY ON DATABASE "db0" TO PUBLIC;
GRANT CONNECT ON DATABASE "db0" TO "dba";
```
## Packaging
Use `make rpms` to build RPM packages for PostgreSQL version that require it.
As of 2020Q4, supported versions that require pg_dumpacl are 9.5, 9.6 and 10.
Define `DIST` to `centos7` or `centos8`, to build RPM packages for CentOS/RHEL
7 or 8, 7 being the default.
## Installation
Enable [Dalibo Labs YUM repository](http://yum.dalibo.org/labs/) and install
`pg_dumpacl10` package or the variant for the version of Postgres installed.
``` console
# yum install -y https://yum.dalibo.org/labs/dalibo-labs-1-1.noarch.rpm
# yum makecache fast
# yum search pg_dumpacl
=================== N/S matched: pg_dumpacl ================================
pg_dumpacl10.x86_64 : Tool for dumping database creation options
pg_dumpacl93.x86_64 : Tool for dumping database creation options
pg_dumpacl94.x86_64 : Tool for dumping database creation options
pg_dumpacl95.x86_64 : Tool for dumping database creation options
pg_dumpacl96.x86_64 : Tool for dumping database creation options
#
```