{"id":21905384,"url":"https://github.com/hex7c0/mongodb-backup","last_synced_at":"2025-04-04T09:09:48.405Z","repository":{"id":24204285,"uuid":"27595789","full_name":"hex7c0/mongodb-backup","owner":"hex7c0","description":"backup data for mongodb for Nodejs","archived":false,"fork":false,"pushed_at":"2024-04-09T19:28:05.000Z","size":271,"stargazers_count":134,"open_issues_count":28,"forks_count":49,"subscribers_count":7,"default_branch":"1.6","last_synced_at":"2025-03-28T08:08:17.652Z","etag":null,"topics":["backup","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"https://github.com/hex7c0/mongodb-backup","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hex7c0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2014-12-05T14:51:43.000Z","updated_at":"2024-01-18T11:07:30.000Z","dependencies_parsed_at":"2024-06-18T14:06:43.294Z","dependency_job_id":null,"html_url":"https://github.com/hex7c0/mongodb-backup","commit_stats":{"total_commits":343,"total_committers":3,"mean_commits":"114.33333333333333","dds":"0.011661807580174877","last_synced_commit":"b13dd250bc0eba699ddb89b1b937887b3f04e40a"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fmongodb-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fmongodb-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fmongodb-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex7c0%2Fmongodb-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex7c0","download_url":"https://codeload.github.com/hex7c0/mongodb-backup/tar.gz/refs/heads/1.6","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149502,"owners_count":20891954,"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","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":["backup","mongodb","nodejs"],"created_at":"2024-11-28T16:33:06.365Z","updated_at":"2025-04-04T09:09:48.387Z","avatar_url":"https://github.com/hex7c0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [mongodb-backup](https://github.com/hex7c0/mongodb-backup)\n\n[![NPM version](https://img.shields.io/npm/v/mongodb-backup.svg)](https://www.npmjs.com/package/mongodb-backup)\n[![Linux Status](https://img.shields.io/travis/hex7c0/mongodb-backup.svg?label=linux)](https://travis-ci.org/hex7c0/mongodb-backup)\n[![Windows Status](https://img.shields.io/appveyor/ci/hex7c0/mongodb-backup.svg?label=windows)](https://ci.appveyor.com/project/hex7c0/mongodb-backup)\n[![Dependency Status](https://img.shields.io/david/hex7c0/mongodb-backup.svg)](https://david-dm.org/hex7c0/mongodb-backup)\n[![Coveralls](https://img.shields.io/coveralls/hex7c0/mongodb-backup.svg)](https://coveralls.io/r/hex7c0/mongodb-backup)\n\nBackup for mongodb\n\nLook at [`mongodb-backup-cli`](https://github.com/hex7c0/mongodb-backup-cli) for command line usage, similar to [mongodump](http://docs.mongodb.org/manual/reference/program/mongodump/)\n\nLook at [`mongodb-restore`](https://github.com/hex7c0/mongodb-restore) for restore data\n\n## Installation\n\nInstall through NPM\n\n```bash\nnpm install mongodb-backup\n```\nor\n```bash\ngit clone git://github.com/hex7c0/mongodb-backup.git\n```\n\nBson@0.4.11 has been pulled out, so versions \u003e= `1.3.0` and \u003c= `1.4.1` are deprecated\n\n## API\n\ninside nodejs project\n```js\nvar backup = require('mongodb-backup');\n\nbackup({\n  uri: 'uri', // mongodb://\u003cdbuser\u003e:\u003cdbpassword\u003e@\u003cdbdomain\u003e.mongolab.com:\u003cdbport\u003e/\u003cdbdatabase\u003e\n  root: __dirname\n});\n```\n\n### backup(options)\n\n#### options\n\n - `uri` - **String** [URI](http://mongodb.github.io/node-mongodb-native/2.0/tutorials/urls/) for MongoDb connection *(default \"required\")*\n - `root`- **String** Path where save data *(default \"required\")*\n - `[parser]` - **String | Function** Data parser (bson, json) or custom *(default \"bson\")*\n - `[collections]` - **Array** Select which collections save *(default \"disabled\")*\n - `[callback]` - **Function** Callback when done *(default \"disabled\")*\n - `[stream]`- **Object** Send `.tar` file to Node stream *(default \"disabled\")*\n - `[tar]` - **String** Pack files into a .tar file *(default \"disabled\")*\n - `[query]` - **Object** Query that optionally limits the documents included *(default \"{}\")*\n - `[numCursors]` - **Number** Set number of cursor for [parallelCollectionScan](https://docs.mongodb.org/v3.0/reference/command/parallelCollectionScan) without query *(default \"disabled\")*\n - `[logger]` - **String** Path where save a .log file *(default \"disabled\")*\n - `[metadata]` - **Boolean** Save metadata of collections as Index, ecc *(default \"false\")*\n - `[options]` - **Object** MongoDb [options](http://mongodb.github.io/node-mongodb-native/2.0/tutorials/connecting/#toc_7) *(default)*\n\n## Examples\n\nTake a look at my [examples](https://github.com/hex7c0/mongodb-backup/tree/1.6/examples)\n\n### [License Apache2](https://github.com/hex7c0/mongodb-backup/blob/1.6/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Fmongodb-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex7c0%2Fmongodb-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex7c0%2Fmongodb-backup/lists"}