{"id":13512415,"url":"https://github.com/sheharyarn/mongo-sync","last_synced_at":"2025-04-06T18:17:40.414Z","repository":{"id":56091868,"uuid":"30808065","full_name":"sheharyarn/mongo-sync","owner":"sheharyarn","description":"Sync Remote and Local MongoDB Databases :fire:","archived":false,"fork":false,"pushed_at":"2020-11-25T21:55:47.000Z","size":20,"stargazers_count":321,"open_issues_count":5,"forks_count":90,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-30T17:09:43.049Z","etag":null,"topics":["hacktoberfest","mongo-sync","mongodb","shell"],"latest_commit_sha":null,"homepage":"https://sheharyar.me/blog/sync-mongodb-local-and-production-heroku/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sheharyarn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-14T20:35:29.000Z","updated_at":"2025-01-08T10:26:36.000Z","dependencies_parsed_at":"2022-08-15T13:00:46.093Z","dependency_job_id":null,"html_url":"https://github.com/sheharyarn/mongo-sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheharyarn%2Fmongo-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheharyarn%2Fmongo-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheharyarn%2Fmongo-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheharyarn%2Fmongo-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheharyarn","download_url":"https://codeload.github.com/sheharyarn/mongo-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526768,"owners_count":20953143,"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":["hacktoberfest","mongo-sync","mongodb","shell"],"created_at":"2024-08-01T03:01:50.284Z","updated_at":"2025-04-06T18:17:40.378Z","avatar_url":"https://github.com/sheharyarn.png","language":"Shell","readme":"[mongo-sync](https://sheharyar.me/blog/sync-mongodb-local-and-production-heroku/)\n=================================================================================\n\n\u003e _Sync Remote and Local MongoDB Databases in Bash. Works with Heroku too!_\n\nFor all the Rubyists out there, I've converted this in to a [Ruby Gem](https://github.com/sheharyarn/mongo-sync-ruby) as well.\n\n![mongo-sync demo gif](http://i.imgur.com/hg6hwLk.gif)\n\n\n## Usage\n\n- Download / Clone the script\n\n    ```bash\n    git clone https://github.com/sheharyarn/mongo-sync.git\n    cd mongo-sync\n    ```\n\n- Edit `config.yml` and insert your configuration details\n\n- Use the script like this:\n\t\n\t```bash\n\t./mongo-sync push [options]\t\t# Push DB to Remote\n\t./mongo-sync pull [options]\t\t# Pull DB to Local\n\t```\n- Options\n\n\t```\n\t-y  # Skip confirmation\n\t--config alternate-config-file.yml\n\t```\n\n## Notes\n\n - `mongo-sync` requires `mongodump` and `mongorestore` binaries to be installed in your system. If you have [`mongodb`](http://docs.mongodb.org/manual/tutorial/#getting-started) installed, then you probably already have them\n - Pushing/Pulling ***overwrites*** the Target DB\n - It's a good idea to keep your `config.yml` in `.gitignore` if you're using it inside some other project\n\n\n## TODO\n\n - Add a `--no-overwrite` flag+feature that doesn't drop the target db before restoring it, and *actually* tries to sync it\n - Add a `backup` command and an `--auto-backup` feature\n - Add more options for Local DB in `config.yml`\n\n\n## Contributing\n\n1. [Fork it](https://github.com/sheharyarn/mongo-sync/fork)\n2. Create your feature/fix branch (`git checkout -b feature/my-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin feature/my-feature`)\n5. Create a new Pull Request\n\n\n## License\n\nCopyright (c) 2015 Sheharyar Naseer\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheharyarn%2Fmongo-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheharyarn%2Fmongo-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheharyarn%2Fmongo-sync/lists"}