{"id":13516252,"url":"https://github.com/mpchadwick/dbanon","last_synced_at":"2026-03-09T23:36:50.587Z","repository":{"id":45524178,"uuid":"178600123","full_name":"mpchadwick/dbanon","owner":"mpchadwick","description":"A run anywhere database anonymizer","archived":false,"fork":false,"pushed_at":"2022-07-17T21:42:52.000Z","size":1119,"stargazers_count":59,"open_issues_count":5,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-19T01:43:40.035Z","etag":null,"topics":["anonymizer","database-anonymizer","golang","magento","mysql-backup","mysqldump","pseudonymization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpchadwick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-30T19:05:54.000Z","updated_at":"2025-11-21T10:36:27.000Z","dependencies_parsed_at":"2022-08-12T11:52:19.544Z","dependency_job_id":null,"html_url":"https://github.com/mpchadwick/dbanon","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/mpchadwick/dbanon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpchadwick%2Fdbanon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpchadwick%2Fdbanon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpchadwick%2Fdbanon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpchadwick%2Fdbanon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpchadwick","download_url":"https://codeload.github.com/mpchadwick/dbanon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpchadwick%2Fdbanon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30316772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anonymizer","database-anonymizer","golang","magento","mysql-backup","mysqldump","pseudonymization"],"created_at":"2024-08-01T05:01:20.726Z","updated_at":"2026-03-09T23:36:50.457Z","avatar_url":"https://github.com/mpchadwick.png","language":"Go","readme":"# dbanon\n\n[![Build Status](https://github.com/mpchadwick/dbanon/actions/workflows/ci.yml/badge.svg)](https://github.com/mpchadwick/dbanon/actions) [![codecov](https://codecov.io/gh/mpchadwick/dbanon/branch/master/graph/badge.svg)](https://codecov.io/gh/mpchadwick/dbanon)\n\nA run-anywhere, dependency-less database anonymizer.\n\n## Installation\n\nDownload [the latest release from GitHub](https://github.com/mpchadwick/dbanon/releases).\n\n## Usage\n\n`dbanon` reads from `stdin` and writes to `stdout`.\n\n```\nmysqldump mydb | dbanon -config=myconfig.yml | gzip \u003e mydb.sql.gz\n```\n\nThe `-config` flag can use bundled configurations or point to the path of a custom configuration file. \n\n### Configuration\n\n#### Magento 2\n\n`dbanon` bundles a [default Magento 2 configuration file](etc/magento2.yml). However you almost certainly won't use it directly.\n\nAt minimum, you'll first need to run the `map-eav` subcommand. This translates EAV attribute codes to their respective attribute ids.\n\nYou must feed it a `mysqldump` of `eav_entity_type` and `eav_attribute` (in that order).\n\n```\nmysqldump mydb eav_entity_type eav_attribute | dbanon -config=magento2 map-eav \u003e ~/magento2-mapped.yml\n```\n\n`map-eav` will replace the attribute codes in the config file with attribute ids and print an updated config to `stdout`.\n\nNext you'd run `dbanon` with the config generated by `map-eav`.\n\n```\nmysqldump mydb | dbanon -config=~/magento2-mapped.yml | gzip \u003e mydb.sql.gz\n```\n\n\nMost Magento 2 databases, however, will have additional data that needs to be anonymized beyond the default bundled file. \n\nFor this you'll first want to create a new configuration file based off the bundled configuration. Instructions on customizing the configuration file are included in the \"Custom Configuration\" section.\n\n\n#### Custom Configuration\n\nSpecify the path to your config file via the `-config` flag\n\n```\nmysqldump mydb | dbanon -config=myconfig.yml | gzip \u003e mydb.sql.gz\n```\n\nSee [the `etc` directory](etc/) for examples.\n\nColumns are specified as key / value pairs. The value string winds up getting passed to [this function](https://github.com/mpchadwick/dbanon/blob/ade634a10bc282c06fecef115afbdd6661a94277/src/provider.go#L36), which gets random values from [`dmgk/faker`](https://github.com/dmgk/faker).\n\nIt is also possible to pass direct Faker function calls for [supported \"raw providers\"](https://github.com/mpchadwick/dbanon/blob/ade634a10bc282c06fecef115afbdd6661a94277/src/provider.go#L13-L17)\n\n## Logging\n\n`dbanon` records messages about anything notable (e.g. invalid configuration) to the file `dbanon.log` in the directory from which you run it.\n\n**`-log-file`**\n\nThe `-log-file` flag can be used to have `dbanon` log to a different location.\n\n```\nmysqldump mydb | dbanon -config=myconfig.yml -log-file=var/dbanon.log\n```\n\n**`-log-level`**\n\nThe `-log-level` flag can be used to control the verbosity of logs. Supported values can be found [here](https://github.com/sirupsen/logrus/blob/d131c24e23baaa812461202af6d7cfa388e2d292/logrus.go#L25-L45).\n\n```\nmysqldump mydb | dbanon -config=myconfig.yml -log-level=debug | gzip \u003e mydb.sql.gz\n```\n\nThe default log level is `info`.\n\n**`-silent`**\n\nLogging can be disabled entirely by passing the `-silent` flag to `dbanon`\n\n```\nmysqldump mydb | dbanon -config=myconfig.yml -silent | gzip \u003e mydb.sql.gz\n```\n\n## Profiling\n\n`dbanon` will generate a CPU profile to the file `dbanon.prof` when passed the `-profile` flag.\n\n```\nmysqldump mydb | dbanon -profile -config=myconfig.yml \u003e/dev/null\n```\n\n## Limitations\n\n- Currently only supports MySQL\n\n## Updating\n\n`dbanon` will self-update when passed the `-update` flag\n\n```\ndbanon -update\n```\n\n## Development\n\n### Publishing releases\n\nReleases are published with [GoReleaser](https://goreleaser.com/).\n\n- Create and push a tag (e.g. `git tag -a v0.6.2 -m \"v0.6.2 \u0026\u0026 git push origin v0.6.2`)\n- Build the `go-bindata` (e.g. `go-bindata -pkg bindata -o bindata/bindata.go etc/*`)\n- Run `goreleaser` (e.g. `goreleaser release --rm-dist`)\n\nMay need to create a new GitHub token if the current one expires\n\nhttps://goreleaser.com/scm/github/","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpchadwick%2Fdbanon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpchadwick%2Fdbanon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpchadwick%2Fdbanon/lists"}