Skip to content

MongoDB running inside docker with backup and restore support for db

License

Notifications You must be signed in to change notification settings

tiberiuc/docker-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-mongodb

A Docker container for running mongodb with support for backups, based on Alpine Linux.

Full support for backup-agent

Quick start

Requires that Docker be installed on the host machine.

# Create some directory where your database data will be stored.
$ mkdir /home/youruser/mongo_data

$ docker run --name mongodb -d \
   --volume /home/youruser/mongo_data:/data/db \
   --publish 27017:27017 \
   --publish 9191:9191 \
   tiberiuc/mongodb

$ docker logs -f mongodb
[ ... ]

Daemonizing

Currently mongodb is run inside supervisor

Backup and restore

Backup

curl http://localhost:9191/backup -o mongodb.tgz

Restore

curl http://localhost:9191/restore --data-binary @./mongodb.tgz

About

MongoDB running inside docker with backup and restore support for db

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published