This is a simple tool for anonymizing a dump file from a PostgreSQL database. The resulting dump can be loaded back into an new database using standard tools (e.g. psql(1)
).
This is heavily inspired by pg-anon and pg-anonymizer.
The pg_anon
is written in Go. You need to setup the Go compiler and
setup environment first to build it.
go get github.com/calazans10/pg_anon
If it went well you should be able to run it:
pg_anon
If not check that you have $GOPATH/bin
in your $PATH
.
A quick example:
pg_anon -d dump.sql -o anon.sql -f name,first_name,last_name,email,phone_number:phone
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Submit a pull request
MIT © Jeferson Farias Calazans