{"id":16830462,"url":"https://github.com/glensc/docker-mongodb-hotbackup","last_synced_at":"2026-04-20T04:01:18.246Z","repository":{"id":138591696,"uuid":"118775852","full_name":"glensc/docker-mongodb-hotbackup","owner":"glensc","description":"MongoDB Hot Backup for Docker","archived":false,"fork":false,"pushed_at":"2019-03-21T20:16:01.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T04:42:54.814Z","etag":null,"topics":["docker","hot-backup","mongodb","percona","percona-mongodb"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/glensc.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":"2018-01-24T14:25:59.000Z","updated_at":"2024-08-12T19:35:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"93dca871-93cf-4b07-bb4f-499c853bb782","html_url":"https://github.com/glensc/docker-mongodb-hotbackup","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/glensc/docker-mongodb-hotbackup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fdocker-mongodb-hotbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fdocker-mongodb-hotbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fdocker-mongodb-hotbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fdocker-mongodb-hotbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glensc","download_url":"https://codeload.github.com/glensc/docker-mongodb-hotbackup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fdocker-mongodb-hotbackup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32032302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["docker","hot-backup","mongodb","percona","percona-mongodb"],"created_at":"2024-10-13T11:39:07.317Z","updated_at":"2026-04-20T04:01:18.209Z","avatar_url":"https://github.com/glensc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MongoDB Hot Backup for Docker\n\n# Usage\n\nThis project provides script to run [Hot Backup](#hot-backup) for [percona/percona-server-mongodb].\n\nThe `mongo` container needs to be setup with local mount:\n\n```yml\nversion: \"3\"\n\nservices:\n  mongo:\n    image: percona/percona-server-mongodb:3.4\n    # (case sensitive) engine: mmapv1, rocksdb, wiredTiger, inMemory\n    command: --storageEngine=wiredTiger\n    volumes:\n      - /srv/backups/mongodb:/backup\n    ports:\n      - 27017:27017\n\n# vim:ts=2:sw=2:et\n```\n\nTo run the backup, specify container name or id on commandline:\n\n```\n./backup-mongodb.sh CONTAINER BACKUP_DIR [USER] [PASSWORD]\n```\n\n- `CONTAINER` can be id, name, label, or swarm service name\n- `BACKUP_DIR` is path that is bind mounted into container: `-v $EXTERNAL_BACKUP_DIR:$CONTAINER_BACKUP_DIR` the value for local dir is detected automatically\n- `USER` mongodb username, optional (will try to autheticate only when filled)\n- `PASSWORD` mongodb password, optional\n\n[percona/percona-server-mongodb]: https://hub.docker.com/r/percona/percona-server-mongodb/\n\n## Hot Backup\n\n[Percona Server for MongoDB] includes an integrated open-source hot backup system for the default [WiredTiger] and alternative [MongoRocks] storage engine. It creates a physical data backup on a running server without notable performance and operating degradation.\n\n[Percona Server for MongoDB]: https://www.percona.com/software/mongo-database/percona-server-for-mongodb\n[WiredTiger]: https://docs.mongodb.org/manual/core/wiredtiger/\n[MongoRocks]: https://www.percona.com/doc/percona-server-for-mongodb/LATEST/mongorocks.html#mongorocks\n\nTo take a hot backup of the database in your current `dbpath`, run the `createBackup` command as administrator on the `admin` database and specify the backup directory.\n\n```\n\u003e use admin\nswitched to db admin\n\u003e db.runCommand({createBackup: 1, backupDir: \"/my/backup/data/path\"})\n{ \"ok\" : 1 }\n```\n\nIf the backup was successful, you should receive an `{ \"ok\" : 1 }` object. If there was an error, you will receive a failing `ok` status with the error message, for example:\n\n```\n\u003e db.runCommand({createBackup: 1, backupDir: \"\"})\n{ \"ok\" : 0, \"errmsg\" : \"Destination path must be absolute\" }\n```\n\nhttps://www.percona.com/doc/percona-server-for-mongodb/LATEST/hot-backup.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglensc%2Fdocker-mongodb-hotbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglensc%2Fdocker-mongodb-hotbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglensc%2Fdocker-mongodb-hotbackup/lists"}