{"id":38642607,"url":"https://github.com/ishanjain28/s3-mongo-backup","last_synced_at":"2026-01-17T09:10:01.979Z","repository":{"id":57152022,"uuid":"87568225","full_name":"ishanjain28/s3-mongo-backup","owner":"ishanjain28","description":"Mongodb backups to S3","archived":false,"fork":false,"pushed_at":"2023-03-09T14:30:26.000Z","size":90,"stargazers_count":19,"open_issues_count":10,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-13T15:15:13.298Z","etag":null,"topics":["aws","aws-s3","backup","backup-script","mongodb","nodejs","nodejs-modules","s3"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ishanjain28.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-07T16:58:37.000Z","updated_at":"2022-02-20T02:27:42.000Z","dependencies_parsed_at":"2024-10-29T15:28:14.016Z","dependency_job_id":null,"html_url":"https://github.com/ishanjain28/s3-mongo-backup","commit_stats":{"total_commits":55,"total_committers":6,"mean_commits":9.166666666666666,"dds":"0.12727272727272732","last_synced_commit":"c4f0758847e4d3ad9b763a69939ebd8bbad9d5b4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ishanjain28/s3-mongo-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishanjain28%2Fs3-mongo-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishanjain28%2Fs3-mongo-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishanjain28%2Fs3-mongo-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishanjain28%2Fs3-mongo-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishanjain28","download_url":"https://codeload.github.com/ishanjain28/s3-mongo-backup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishanjain28%2Fs3-mongo-backup/sbom","scorecard":{"id":495454,"data":{"date":"2025-08-11","repo":{"name":"github.com/ishanjain28/s3-mongo-backup","commit":"c4f0758847e4d3ad9b763a69939ebd8bbad9d5b4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/21 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-rrc9-gqf8-8rwg","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-4hpf-3wq7-5rpr","Warn: Project is vulnerable to: GHSA-f522-ffg8-j8r6","Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T20:20:27.161Z","repository_id":57152022,"created_at":"2025-08-19T20:20:27.161Z","updated_at":"2025-08-19T20:20:27.161Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504849,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"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":["aws","aws-s3","backup","backup-script","mongodb","nodejs","nodejs-modules","s3"],"created_at":"2026-01-17T09:10:01.275Z","updated_at":"2026-01-17T09:10:01.927Z","avatar_url":"https://github.com/ishanjain28.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s3-mongo-backup\nThis Module Helps in automating mongodb database Backups and uploading them to AWS S3.\n\n# Features\n\n- Supports Promises\n- Uploads Backups to S3 in \"mongoDbBackups\" folder\n- Uses GZip Compression to reduce Backup Size\n\n# Usage\n\n## Import \n\n```javascript\nconst MBackup = require('s3-mongo-backup');\n```\n\n## Create a configuration Object\n\n```javascript\nvar backupConfig = {\n    mongodb: \"mongodb://username:password@localhost:27017\", // MongoDB Connection URI \n    s3: {\n        accessKey: \"\",  //AccessKey\n        secretKey: \"\",  //SecretKey\n        region: \"\",     //S3 Bucket Region\n        accessPerm: \"private\", //S3 Bucket Privacy, Since, You'll be storing Database, Private is HIGHLY Recommended\n        bucketName: \"\" //Bucket Name\n    },\n    keepLocalBackups: false,  //If true, It'll create a folder in project root with database's name and store backups in it and if it's false, It'll use temporary directory of OS\n    noOfLocalBackups: 5, //This will only keep the most recent 5 backups and delete all older backups from local backup directory\n    timezoneOffset: 300 //Timezone, It is assumed to be in hours if less than 16 and in minutes otherwise\n}\n```\n\n### Or \n\n```javascript\nvar backupConfig = {\n    mongodb: {\n        \"database\": \"freecodecamp\",\n        \"host\": \"localhost\",\n        \"username\": \"admin\",\n        \"password\": \"password\",\n        \"port\": 27017\n    },   \n    s3: {\n        accessKey: \"\",  //AccessKey\n        secretKey: \"\",  //SecretKey\n        region: \"\",     //S3 Bucket Region\n        accessPerm: \"private\", //S3 Bucket Privacy, Since, You'll be storing Database, Private is HIGHLY Recommended\n        bucketName: \"\" //Bucket Name\n    },\n    keepLocalBackups: false,  //If true, It'll create a folder in project root with database's name and store backups in it and if it's false, It'll use temporary directory of OS\n    noOfLocalBackups: 5, //This will only keep the most recent 5 backups and delete all older backups from local backup directory\n    timezoneOffset: 300 //Timezone, It is assumed to be in hours if less than 16 and in minutes otherwise\n}\n```\n\n\n### Call the Function and provide Configuration Object to it. \n\n```javascript\nMBackup(backupConfig)\n    .then(\n    onResolve =\u003e {\n    // When everything was successful\n        console.log(onResolve);\n},\n    onReject =\u003e {\n    // When Anything goes wrong!\n        console.log(onReject);\n});\n```\n\n\u003e See examples directory for more examples\n\n### Timezone offset's Purpose\n\nDatabase zip files are stored in format `{database_name}_{YYYY-MM-DDTHH:mm:ss}`. Here, If you don't provide a Timezone offset, It'll assume UTC timezone and name all the backups accordingly. Now, If something goes wrong at \"2:00 PM\" in your timezone and you need to restore a backup made at \"1:00 PM\" in your timezone, You'll have to change UTC time to your time and then see which backup you have to restore. \n\nBut If you provide a timezone of where ever you live, You can immdiately recognise which backup can be useful. \n\nTo see how to provide Timezone offset, Please refer to [moment#utcOffset](http://momentjs.com/docs/#/manipulating/utc-offset/)\n\n# License\n\nMIT\n\n# Changelog\n\n    2.0.0 -\u003e Uses MongoDB Connection URI directly, instead of asking for individual values of username, database name, password and database host.\n\n\n## NOTE\n\n1. This module uses `mongodump` to create backup of database, You need to have it installed on the machine on which you are using this module. \n2. To restore the generated backups\n\n```bash\nmongorestore --host localhost --port=27017 --gzip --archive=\\\u003cpath to backup.gz\\\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishanjain28%2Fs3-mongo-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishanjain28%2Fs3-mongo-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishanjain28%2Fs3-mongo-backup/lists"}