https://github.com/mmontes11/mongodb-tools
MongoDB tools for amd64, arm64 and armhf
https://github.com/mmontes11/mongodb-tools
backup database mongo mongodb mongodb-tools restore
Last synced: about 2 months ago
JSON representation
MongoDB tools for amd64, arm64 and armhf
- Host: GitHub
- URL: https://github.com/mmontes11/mongodb-tools
- Owner: mmontes11
- Created: 2021-05-16T15:39:40.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-17T16:00:31.000Z (about 5 years ago)
- Last Synced: 2024-12-31T04:12:41.441Z (over 1 year ago)
- Topics: backup, database, mongo, mongodb, mongodb-tools, restore
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mongodb-tools
[](https://github.com/mmontes11/mongodb-backup/actions?query=workflow%3ARelease)
MongoDB backup tools for `amd64`, `arm64` and `armhf`
### Backup
Dumps a database in a volume.
```yml
version: "3"
services:
mongo:
image: mongo:4.2.3
ports:
- "27017:27017"
volumes:
- ./data:/data/db
restart: unless-stopped
mongo-dump:
image: mmontes11/mongodb-backup:v0.0.1
environment:
- MONGO_URL=mongodb://mongo:27017/db
volumes:
- ./backup:/backup
```
### Restore
Restores a database using the dump provided in a volume.
```yml
version: "3"
services:
mongo:
image: mongo:4.2.3
ports:
- "27017:27017"
volumes:
- ./data:/data/db
restart: unless-stopped
mongo-dump:
image: mmontes11/mongodb-backup:v0.0.1
command: ["./entrypoint.sh", "restore"]
environment:
- MONGO_URL=mongodb://mongo:27017/db
volumes:
- ./backup:/backup
```