{"id":19135558,"url":"https://github.com/sirwanafifi/sqldumpjs","last_synced_at":"2026-03-05T10:32:01.648Z","repository":{"id":57306971,"uuid":"258531385","full_name":"SirwanAfifi/sqldumpjs","owner":"SirwanAfifi","description":"A tiny wrapper around mysqldump utility to generate a dump file of a MySQL database.","archived":false,"fork":false,"pushed_at":"2021-02-16T07:35:43.000Z","size":17,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-12T08:40:52.385Z","etag":null,"topics":["database","mysql","mysqldump"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/SirwanAfifi.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":"2020-04-24T14:13:53.000Z","updated_at":"2024-06-24T13:57:57.000Z","dependencies_parsed_at":"2022-09-08T05:10:38.016Z","dependency_job_id":null,"html_url":"https://github.com/SirwanAfifi/sqldumpjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SirwanAfifi/sqldumpjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirwanAfifi%2Fsqldumpjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirwanAfifi%2Fsqldumpjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirwanAfifi%2Fsqldumpjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirwanAfifi%2Fsqldumpjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SirwanAfifi","download_url":"https://codeload.github.com/SirwanAfifi/sqldumpjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SirwanAfifi%2Fsqldumpjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268286192,"owners_count":24225902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["database","mysql","mysqldump"],"created_at":"2024-11-09T06:31:03.135Z","updated_at":"2026-03-05T10:32:01.607Z","avatar_url":"https://github.com/SirwanAfifi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MySQLDump.js\n\nA tiny wrapper around `mysqldump` utility to generate a dump file of a MySQL database.\n\n### Usage\n\n- `yarn add mysqldumpjs`\n- Import the package:\n\n```ts\nimport MySQLDump from \"mysqldumpjs\";\n```\n\n### Dump all tables\n\n```js\nnew MySQLDump({\n  dbName: process.env.DATABASE_NAME,\n  password: process.env.DATABASE_PASSWORD,\n}).doBackup(\"outputFileName\");\n```\n\n### Dump specific tables\n\n```js\nnew MySQLDump({\n  dbName: process.env.DATABASE_NAME,\n  password: process.env.DATABASE_PASSWORD,\n  flags: {\n    tables: [\"customers\", \"orders\"],\n    compact: true,\n  },\n}).doBackup(\"outputFileName\");\n```\n\n### Dump tables with where clause\n\n```js\nnew MySQLDump({\n  dbName: process.env.DATABASE_NAME,\n  password: process.env.DATABASE_PASSWORD,\n  flags: {\n    tables: [\n      \"customers\",\n      \"orders\",\n      { table: \"products\", where: \"product_id = 4\" },\n      { table: \"shippers\", where: \"name = 'Hettinger LLC'\" },\n    ],\n    compact: true,\n  },\n}).doBackup(\"outputFileName\");\n```\n\n### Options\n\nThese are `mysqldump` options you can pass in to a `MySQLDump` instance.\n\n| Option            |                              Description                              | Default |\n| ----------------- | :-------------------------------------------------------------------: | ------: |\n| `tables`          |                 The list of tables you want to export                 |    `[]` |\n| `noData`          |                      Do not dump table contents                       | `false` |\n| `where`           |           Dump only rows selected by given WHERE condition            | `false` |\n| `compact`         |                      Produce more compact output                      | `false` |\n| `addDropDatabase` |   Add DROP DATABASE statement before each CREATE DATABASE statement   | `false` |\n| `addDropTable`    |      Add DROP TABLE statement before each CREATE TABLE statement      | `false` |\n| `withRoutines`    | Dump stored routines (procedures and functions) from dumped databases | `false` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirwanafifi%2Fsqldumpjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirwanafifi%2Fsqldumpjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirwanafifi%2Fsqldumpjs/lists"}