{"id":13501733,"url":"https://github.com/chrisantonellis/mongobar","last_synced_at":"2025-04-12T23:53:44.179Z","repository":{"id":57442894,"uuid":"102127789","full_name":"chrisantonellis/mongobar","owner":"chrisantonellis","description":"mongobar 🍫  MongoDB Backup and Restore manager","archived":false,"fork":false,"pushed_at":"2018-08-24T14:25:37.000Z","size":1701,"stargazers_count":46,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T23:53:40.023Z","etag":null,"topics":["mongodb","mongodb-backup","mongodump","mongorestore"],"latest_commit_sha":null,"homepage":"","language":"Python","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/chrisantonellis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-01T15:38:01.000Z","updated_at":"2025-03-11T11:55:08.000Z","dependencies_parsed_at":"2022-09-26T17:21:20.941Z","dependency_job_id":null,"html_url":"https://github.com/chrisantonellis/mongobar","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisantonellis%2Fmongobar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisantonellis%2Fmongobar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisantonellis%2Fmongobar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisantonellis%2Fmongobar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisantonellis","download_url":"https://codeload.github.com/chrisantonellis/mongobar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647237,"owners_count":21139083,"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":["mongodb","mongodb-backup","mongodump","mongorestore"],"created_at":"2024-07-31T22:01:47.886Z","updated_at":"2025-04-12T23:53:44.148Z","avatar_url":"https://github.com/chrisantonellis.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## mongobar [![Build Status](https://travis-ci.org/chrisantonellis/mongobar.svg?branch=master)](https://travis-ci.org/chrisantonellis/mongobar) [![Coverage Status](https://coveralls.io/repos/github/chrisantonellis/mongobar/badge.svg?branch=master)](https://coveralls.io/github/chrisantonellis/mongobar?branch=master)\n![](assets/backups.png)\nmongobar is a python shell script used to create and manage MongoDB backups. Internally it is a wrapper for the MongoDB  **mongodump** and **mongorestore** commands.  \n\n## Installation\n```\npip install mongobar\n```\n## Usage\nRun `mongobar` in a terminal\n\n## Help\nAccess help via the `-h --help` commands. All actions have associated help text.  \n\n`mongobar --help`  \n![mongobar --help](assets/help.png)  \n`mongobar backup --help`  \n![mongobar --help](assets/help_backup.png)    \n\n## Configuration\nmongobar comes with a default configuration that defines a `Connection` for a MongoDB server running on **localhost:27017** with authentication disabled. Here is what that config looks like:\n```json\n{\n    \"root\": \"~/.mongobar_backups\",\n    \"log_level\": \"INFO\",\n    \"connections\": {\n        \"default\": {\n            \"host\": \"localhost\",\n            \"port\": 27017\n        }\n    }\n}\n```\nThe `default` connection can be overridden and additional  connections can be added by writing a config file. Here is an example of a custom config:\n```json\n{\n    \"connections\": {\n        \"default\": {\n            \"host\": \"localhost\",\n            \"port\": 27017,\n            \"username\": \"user\",\n            \"password\": \"pass\",\n            \"authdb\": \"admin\"\n        },\n        \"production\": {\n            \"host\": \"102.100.204.35\",\n            \"port\": 27017,\n            \"username\": \"user\",\n            \"password\": \"pass\",\n            \"authdb\": \"admin\"\n        }\n    }\n}\n```\nmongobar will try to load a config file from `~/.mongobar_config.json` by default. This path can be changed by using the `--config` flag. The current configuration can be viewed by running the `config` action.\n\n## Connections\nmongobar uses the `connection` action to view and set the **current connection**. This attribute is used by actions `backup`, `restore`, `remove`, `backups`, `hosts`, and `meta`. Connections are defined in the configuration file and can be viewed by running the `config` action.\n\n\u003c!-- ## Examples\n\n#### `mongobar backups`\nView backups\n![](assets/backups.png)\n\n#### `mongobar meta \u003cbackup name\u003e`\nView backup metadata\n![](assets/meta.png)\n\n#### `mongobar hosts`\nView host directories\n![](assets/hosts.png)\n\n#### `mongobar config`\nView configuration\n![](assets/config.png)\n\n#### `mongobar server`\nView server metadata\n![](assets/server.png) --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisantonellis%2Fmongobar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisantonellis%2Fmongobar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisantonellis%2Fmongobar/lists"}