{"id":16430152,"url":"https://github.com/its-alex/restic-mongo-docker","last_synced_at":"2025-11-05T02:03:02.689Z","repository":{"id":253765229,"uuid":"844441057","full_name":"Its-Alex/restic-mongo-docker","owner":"Its-Alex","description":"Docker image with restic and mongodb database tools","archived":false,"fork":false,"pushed_at":"2024-08-19T13:24:14.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T13:59:26.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Its-Alex.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":"2024-08-19T09:08:47.000Z","updated_at":"2024-08-19T13:24:17.000Z","dependencies_parsed_at":"2024-08-21T19:17:04.582Z","dependency_job_id":null,"html_url":"https://github.com/Its-Alex/restic-mongo-docker","commit_stats":null,"previous_names":["its-alex/restic-mongodump-docker","its-alex/restic-mongo-docker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Its-Alex/restic-mongo-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Alex%2Frestic-mongo-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Alex%2Frestic-mongo-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Alex%2Frestic-mongo-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Alex%2Frestic-mongo-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Its-Alex","download_url":"https://codeload.github.com/Its-Alex/restic-mongo-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Its-Alex%2Frestic-mongo-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262888991,"owners_count":23380136,"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":[],"created_at":"2024-10-11T08:25:52.028Z","updated_at":"2025-11-05T02:03:02.648Z","avatar_url":"https://github.com/Its-Alex.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Image to backup Mongodb database with Restic\n\nYou can use this Docker image `itsalex/restic-mongo:latest` sidecar to backup your Mongodb database.\n\nThis Docker image is powered by:\n\n- [`mongodb database tools`](https://www.mongodb.com/try/download/database-tools) - Collection of command-line utilities for working with a MongoDB deployment.\n- [`restic`](https://github.com/restic/restic/) - Fast, secure, efficient backup program.\n- [`Rclone`](https://rclone.org/) - Rclone is a command-line program to manage files on cloud storage.\n- [`supercronic`](https://github.com/aptible/supercronic) - Cron for containers.\n\nIf you are looking for a Restic for Postgres based Docker image to backup your\nfiles, you can check out the following project: https://github.com/stephane-klein/restic-pg_dump-docker/\n\n\n## Getting started\n\nTo use this container you can launch it from docker cli:\n\n```sh\n$ docker run \\\n    -e AWS_ACCESS_KEY_ID=\"admin\" \\\n    -e AWS_SECRET_ACCESS_KEY=\"password\" \\\n    -e RESTIC_REPOSITORY=\"s3:http://minio:9000/bucket1\" \\\n    -e RESTIC_PASSWORD=\"secret\" \\\n    -e RESTIC_HOST=db-test \\\n    -e MONGO_USERNAME=\"mongo\" \\\n    -e MONGO_PASSWORD=\"password\" \\\n    -e MONGO_HOST=\"mongo\" \\\n    -e MONGO_DATABASES=\"mongo\" \\\n    itsalex/restic-mongo:latest\n```\n\nOr add it to a `docker-compose.yml`:\n\n```yaml\nrestic-pg-dump:\n  image: itsalex/restic-mongo:latest\n  environment:\n    AWS_ACCESS_KEY_ID: \"admin\"\n    AWS_SECRET_ACCESS_KEY: \"password\"\n    RESTIC_REPOSITORY: \"s3:http://minio:9000/bucket1\"\n    RESTIC_PASSWORD: secret\n    RESTIC_HOST: db-test\n    MONGO_USERNAME: mongo\n    MONGO_PASSWORD: password\n    MONGO_HOST: mongo\n    MONGO_DATABASES: mongo\n```\n\n## Configuration\n\n- Configure the mongodump command to backup with this variable environments:\n  - `MONGO_USERNAME`;\n  - `MONGO_PASSWORD`;\n  - `MONGO_HOST`;\n  - `MONGO_PORT` (default: `27017`).\n- `RESTIC_PASSWORD` to [encrypte your backup](https://restic.readthedocs.io/en/latest/faq.html#how-can-i-specify-encryption-passwords-automatically) (empty by default, i.e. no encrypted).\n- `RESTIC_DOCKER_BACKUP_CRON_SCHEDULE` (default `0 * * * *` hourly).\n- `RESTIC_DOCKER_SNAPSHOT_ID` (default to `latest`)\n- Configure [`restic forget`](https://restic.readthedocs.io/en/latest/060_forget.html#) (which allows removing old snapshots) with this variable environments:\n  - `RESTIC_KEEP_HOURLY` (default: `24`);\n  - `RESTIC_KEEP_DAILY` (default: `7`);\n  - `RESTIC_KEEP_WEEKLY`  (default: `4`);\n  - `RESTIC_KEEP_MONTHLY` (default: `12`).\n  - Set `RESTIC_DOCKER_IS_FORGET_DISABLED=1` to disable [`restic forget`](https://restic.readthedocs.io/en/latest/060_forget.html).\n\nYou can configure many target storage. For instance:\n\n- Store your backup to S3 like Object Storage:\n  - `AWS_ACCESS_KEY_ID`;\n  - `AWS_SECRET_ACCESS_KEY`;\n  - `RESTIC_REPOSITORY` : `s3:http://minio:9000/bucket1`.\n- Store your backup to ftp:\n  - `RESTIC_REPOSITORY`: `rclone:ftpd_server:backup`.\n\nMore options, see [Restic environment variables documentation](https://restic.readthedocs.io/en/stable/040_backup.html#environment-variables).\n\n## License\n\nRestic mongo docker is licensed under [BSD 2-Clause License](https://opensource.org/licenses/BSD-2-Clause). You can find the\ncomplete text in [`LICENSE`](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-alex%2Frestic-mongo-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fits-alex%2Frestic-mongo-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fits-alex%2Frestic-mongo-docker/lists"}