https://github.com/nitpum/mongo-s3-backup
Docker image for mongo backup to s3
https://github.com/nitpum/mongo-s3-backup
docker mongodb s3cmd s3cmd-backup
Last synced: 2 months ago
JSON representation
Docker image for mongo backup to s3
- Host: GitHub
- URL: https://github.com/nitpum/mongo-s3-backup
- Owner: nitpum
- License: mit
- Created: 2022-02-27T14:03:32.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-28T04:16:45.000Z (about 3 years ago)
- Last Synced: 2025-01-27T13:48:09.192Z (4 months ago)
- Topics: docker, mongodb, s3cmd, s3cmd-backup
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mongo-s3-backup
[](https://ko-fi.com/F1F21LCOB)
Docker image for backup mongodb with s3cmd
## Usage
```bash
docker run \
-e MONGO_URI="mongodb://root:root@localhost:27017/db" \
-e S3_ACCESS_KEY="ACCESS_KEY" \
-e S3_SECRET_KEY="SECRET_KEY" \
-e S3_PATH="s3://bucket/backup/" \
-e S3_HOST_BASE="" \
-e S3_HOST_BUCKET="" \
-e S3_WEBSITE_ENDPOINT="" \
ghcr.io/nitpum/mongo-s3-backup:main
```### Environment variables
- `MONGO_URI` Mongo uri example: `mongodb://root:root@localhost:27017/db`
- `S3_ACCESS_KEY` S3 access key
- `S3_SECRET_KEY` S3 secret key
- `S3_PATH` S3 path example: `s3://bucket/backup/` (with trailing slash)
- `S3_HOST_BASE` S3 host base example: `s3.amazonaws.com` or `nyc1.digitaloceanspaces.com`
- `S3_HOST_BUCKET` S3 host bucket example: `%(bucket)s.s3.amazonaws.com` or `%(bucket)s.fra1.digitaloceanspaces.com`
- `S3_WEBSITE_ENDPOINT` S3 website endpoint example: `http://%(bucket)s.s3-website-% (location)s.amazonaws.com/` or`http://%(bucket)s.s3-website-%(location)s.digitaloceanspaces.com/`## Support
If you think this is useful, please consider support me ;)
[](https://ko-fi.com/F1F21LCOB)
## License
[MIT License](LICENSE)