{"id":18610562,"url":"https://github.com/ixnode/bash-db-dumper","last_synced_at":"2026-02-25T16:03:37.508Z","repository":{"id":65547454,"uuid":"594443267","full_name":"ixnode/bash-db-dumper","owner":"ixnode","description":"This tool helps you to dump db fixtures from given database and can import existing db fixtures. Credentials and configurations are read from an .env file.","archived":false,"fork":false,"pushed_at":"2023-10-12T10:11:14.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T17:53:12.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/ixnode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-28T15:15:52.000Z","updated_at":"2023-02-06T13:36:20.000Z","dependencies_parsed_at":"2024-11-07T03:11:37.164Z","dependency_job_id":null,"html_url":"https://github.com/ixnode/bash-db-dumper","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"68e7576d159463dc4458e3155ff499f8e04d0079"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ixnode/bash-db-dumper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-db-dumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-db-dumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-db-dumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-db-dumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixnode","download_url":"https://codeload.github.com/ixnode/bash-db-dumper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixnode%2Fbash-db-dumper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29829410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T15:41:19.027Z","status":"ssl_error","status_checked_at":"2026-02-25T15:40:47.150Z","response_time":61,"last_error":"SSL_read: 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":[],"created_at":"2024-11-07T03:11:03.844Z","updated_at":"2026-02-25T16:03:37.493Z","avatar_url":"https://github.com/ixnode.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bash DB Dumper\n\n[![Release](https://img.shields.io/github/v/release/ixnode/bash-db-dumper)](https://github.com/ixnode/bash-db-dumper/releases)\n[![PHP](https://img.shields.io/badge/PHP-^8.0-777bb3.svg?logo=php\u0026logoColor=white\u0026labelColor=555555\u0026style=flat)](https://www.php.net/supported-versions.php)\n[![LICENSE](https://img.shields.io/github/license/ixnode/bash-db-dumper)](https://github.com/ixnode/bash-db-dumper/blob/master/LICENSE)\n\n\u003e This tool helps you to dump db fixtures from given database and can import existing db fixtures.\n\u003e Credentials and configurations are read from an .env file.\n\n## Installation\n\n### Within a PHP project ([composer](https://getcomposer.org/))\n\n```bash\ncomposer require --dev ixnode/bash-db-dumper\n```\n\n```bash\nvendor/bin/db-dumper -V\n```\n\n```bash\ndb-dumper 0.1.1 (2023-28-01 18:07:16) - Björn Hempel \u003cbjoern@hempel.li\u003e\n```\n\n### Outside the project\n\n```bash\ngit clone git@github.com:ixnode/bash-db-dumper.git \u0026\u0026 cd bash-db-dumper\n```\n\n```bash\nbin/db-dumper -V\n```\n\n```bash\ndb-dumper 0.1.1 (2023-28-01 18:07:16) - Björn Hempel \u003cbjoern@hempel.li\u003e\n```\n\n## Preparation\n\nAdd at least the following configuration variables to your .env file:\n\n* `MYSQLDUMP_DATABASE_URL`\n* `MYSQLDUMP_IGNORED_TABLES`\n\n```bash\n###\u003e table-dumper (local docker settings) ###\nMYSQLDUMP_DATABASE_URL=mysql://\u003cdb-user\u003e:\u003cdb-pass\u003e@\u003cdb-host\u003e:\u003cdb-port\u003e/\u003cdb-name\u003e?serverVersion=\u003cversion\u003e\nMYSQLDUMP_IGNORED_TABLES=\n###\u003c table-dumper (local docker settings) ###\n```\n\nSee `.env.dist` file for other examples and configuration variables like:\n\n* `MYSQLDUMP_FILTERED_TABLES`\n* `MYSQLDUMP_TABLES_NO_DATA`\n* `MYSQLDUMP_TABLES_ONLY_DATA`\n* `MYSQLDUMP_VIEWS`\n\n\n# MySQL dump settings: Views will be imported after importing all tables to be sure all needed tables are exists\n#\n# Example: MYSQLDUMP_VIEWS=view_1,view_2\n#=\n\n### Overview of configuration\n\n| Variable                                    | Description                                                                                                                                             | Example                                                                   |\n|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| `MYSQLDUMP_DATABASE_URL`                    | Contains the database credentials.                                                                                                                      | `mysql://user:pass@localhost:3306/db?serverVersion=8.0`                   |\n| `MYSQLDUMP_IGNORED_TABLES`                  | Contains a comma-separated list of tables which are to be ignored by the dump command. Asterisk can be used to specify several tables at once.          | `table1,table2,cache_*`                                                   |\n| `MYSQLDUMP_FILTERED_TABLES`                 | Used to filter the content of tables. As an example only export data that is not deleted or is hidden (`deleted = 0 AND hidden = 0`).                   | `table3:\"deleted = 0 AND hidden = 0\",table4:\"deleted = 0 AND hidden = 0\"` |\n| `$MYSQLDUMP_FILTERED_TABLES_DELETED_HIDDEN` | A shortcut for `MYSQLDUMP_FILTERED_TABLES` with `--where=\"deleted = 0 AND hidden = 0\"`. Contains a comma-separated list of tables to be filtered.       | `table3,table4`                                                           |\n| `MYSQLDUMP_TABLES_NO_DATA`                  | Contains a comma-separated list of tables from which no data should be dumped. Asterisk can be used to specify several tables at once.                  | `table5,table6_*`                                                         |\n| `MYSQLDUMP_TABLES_ONLY_DATA`                | Contains a comma-separated list of tables from which no structure of tables should be dumped. Asterisk can be used to specify several tables at once.   | `table7,table8_*`                                                         |\n| `MYSQLDUMP_VIEWS`                           | Contains a comma-separated list of views. Views will be imported after the tables are imported. Asterisk can be used to specify several tables at once. | `view1,view2_*`                                                           |\n\n## Dump tables into db fixtures\n\n### Via composer\n\n```bash\nvendor/bin/db-dumper dump\n```\n\n### Cloned project\n\n```bash\nbin/db-dumper dump\n```\n\nAll dumps are then located in `./fixtures/db/*.sql`.\n\n## Import existing db fixtures located in `./fixtures/db/*.sql` into database\n\n### Via composer\n\n```bash\nvendor/bin/db-dumper import\n```\n\n### Cloned project\n\n```bash\nbin/db-dumper import\n```\n\n## Show help\n\nShows the parameters and arguments of the tool.\n\n```bash\nvendor/bin/db-dumper -h\n```\n\n```bash\ndb-dumper 0.1.1 (2023-28-01 18:07:16) - Björn Hempel \u003cbjoern@hempel.li\u003e\n\nUsage: db-dumper [options...] dump\nUsage: db-dumper [options...] import\n\n -e,    --env-path                    Contains the environment path (.env.local)\n\n -dcs,  --disable-column-statistics   Disable mysql column statistics\n\n\n -t,    --with-time                   Also outputs the time to each log entry (default: false).\n -v,    --verbose                     Set output to verbose (default: false).\n -c,    --color                       Colored output (default: false).\n -d,    --debug                       Set to debug mode. No longer performs any actions.\n                                      Shows only the commands. (default: false).\n -l,    --print-log                   Print the log file\n -u,    --update-version              Shows this script with updated version read from VERSION\n -h,    --help                        Shows this help.\n -V,    --version                     Shows the version number.\n```\n\n## Use debug mode\n\nThe command only shows the commands and does not execute them:\n\n### Via composer\n\n```bash\nvendor/bin/db-dumper dump -d\n```\n\n```bash\nvendor/bin/db-dumper import -d\n```\n\n### Cloned project\n\n```bash\nbin/db-dumper dump -d\n```\n\n```bash\nbin/db-dumper import -d\n```\n\n## Show last log\n\n```bash\nvendor/bin/db-dumper -l\n```\n\n## Update version\n\n```bash\nvendor/bin/version-manager --patch\n```\n\n```bash\nbin/db-dumper -u\n```\n\n```bash\nrm bin/db-dumper \u0026\u0026 mv bin/db-dumper.tmp bin/db-dumper\n```\n\n```bash\nvi CHANGELOG.md\n```\n\n## License\n\nThis tool is licensed under the MIT License - see the [LICENSE.md](/LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnode%2Fbash-db-dumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixnode%2Fbash-db-dumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixnode%2Fbash-db-dumper/lists"}