{"id":28310618,"url":"https://github.com/bwnyasse/docker-mongodb-worker","last_synced_at":"2026-03-07T02:02:42.865Z","repository":{"id":72962580,"uuid":"64791217","full_name":"bwnyasse/docker-mongodb-worker","owner":"bwnyasse","description":"Docker image that provides capability to perform native Mongodb binary and data import/export","archived":false,"fork":false,"pushed_at":"2016-08-11T08:08:01.000Z","size":12,"stargazers_count":21,"open_issues_count":6,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-21T14:40:48.656Z","etag":null,"topics":["backup","docker","docker-compose","dump","mongodb"],"latest_commit_sha":null,"homepage":"","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/bwnyasse.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-02T20:42:30.000Z","updated_at":"2023-09-30T20:49:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"554b5ac0-82a1-494e-9a69-064a04f9be85","html_url":"https://github.com/bwnyasse/docker-mongodb-worker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bwnyasse/docker-mongodb-worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwnyasse%2Fdocker-mongodb-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwnyasse%2Fdocker-mongodb-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwnyasse%2Fdocker-mongodb-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwnyasse%2Fdocker-mongodb-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwnyasse","download_url":"https://codeload.github.com/bwnyasse/docker-mongodb-worker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwnyasse%2Fdocker-mongodb-worker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30205893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"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":["backup","docker","docker-compose","dump","mongodb"],"created_at":"2025-05-24T11:11:37.263Z","updated_at":"2026-03-07T02:02:42.846Z","avatar_url":"https://github.com/bwnyasse.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-mongodb-worker\nDocker image that provides capability :\n- to perform native Mongodb binary and data **import/export**\n- backup **dump** of the database\n\n## Description\n\n### Parameters\n\n\n    MONGO_HOST              the host/ip of your mongodb database\n    MONGO_PORT              the port number of your mongodb database\n    MONGO_DB_NAME           the database name\n    MONGO_COLLECTION_NAME   the database collection to work on, according to the MONGO_DB_NAME provided\n    MONGO_BACKUP_FILENAME   the name of the generated file\n    CRON_SCHEDULE           the interval of cron job to run mongodump\n\n\nIn order to specify the willing action, you must override the default docker command. The running container requires the following environments variables :\n\n- Require for every jobs:\n  - MONGO_HOST, MONGO_PORT\n\n\n- Require for Export :\n  - MONGO_DB_NAME, MONGO_COLLECTION_NAME, MONGO_BACKUP_FILENAME\n\n\n- Require for Import:\n  - MONGO_DB_NAME, MONGO_COLLECTION_NAME\n\n\n- Require for Dump:\n  - MONGO_BACKUP_FILENAME\n\n## Usage\n\nThis container is designed to perform operations on a running mongoDB instance.\n\n### Import\n\nTo import json data, this container assumed that the filename is **import.json**.\n\nIf **YOUR_PATH/import.json** is the location of the import file :\n\n          docker run \\\n                -v YOUR_PATH/:/tmp/mongodb/  \\\n                -e MONGO_HOST=your_host_value \\\n                -e MONGO_PORT=your_port_value \\\n                -e MONGO_DB_NAME=your_db_name \\\n                -e MONGO_COLLECTION_NAME=your_collection_name \\\n                bwnyasse/docker-mongodb-worker \\\n                /start.sh -i\n\n\n### Export\n\n- With cron\n\n\n          docker run \\\n                -e MONGO_HOST=your_host_value \\\n                -e MONGO_PORT=your_port_value \\\n                -e MONGO_DB_NAME=your_db_name \\\n                -e MONGO_COLLECTION_NAME=your_collection_name \\\n                -e CRON_SCHEDULE=your_cron_schedule \\\n                -e MONGO_BACKUP_FILENAME=your_backup_filename_without_extension \\\n                bwnyasse/docker-mongodb-worker \\\n                /start.sh -e cron\n\n\n- Without cron ( direct export)\n\n\n          docker run \\\n                -e MONGO_HOST=your_host_value \\\n                -e MONGO_PORT=your_port_value \\\n                -e MONGO_DB_NAME=your_db_name \\\n                -e MONGO_COLLECTION_NAME=your_collection_name \\\n                -e MONGO_BACKUP_FILENAME=your_backup_filename_without_extension \\\n                bwnyasse/docker-mongodb-worker \\\n                /start.sh -e no-cron\n\n\n### Dump\n\n- With cron\n\n\n          docker run \\\n                -e MONGO_HOST=your_host_value \\\n                -e MONGO_PORT=your_port_value \\\n                -e CRON_SCHEDULE=your_cron_schedule \\\n                -e MONGO_BACKUP_FILENAME=your_backup_filename_without_extension \\\n                bwnyasse/docker-mongodb-worker \\\n                /start.sh -d cron\n\n\n- Without cron ( direct dump)\n\n\n          docker run \\\n                -e MONGO_HOST=your_host_value \\\n                -e MONGO_PORT=your_port_value \\\n                -e MONGO_BACKUP_FILENAME=your_backup_filename_without_extension \\\n                bwnyasse/docker-mongodb-worker \\\n                /start.sh -d no-cron\n\n\n### Backup Data\n\n For export and dump ,the backup data will be hosted into **/backup/**\n\n## Example\n\n\nEasy to use with docker-compose , go into the [example](https://github.com/bwnyasse/docker-mongodb-worker/tree/master/example)\n\n- run **docker-compose -f example.yml**\n- Every minute, we will see a .json file and a .tar from export and dump into  **example/data/** directory  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwnyasse%2Fdocker-mongodb-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwnyasse%2Fdocker-mongodb-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwnyasse%2Fdocker-mongodb-worker/lists"}