Public Repository

Last pushed: 2 years ago
Short Description
Image for quickly dumping a mongo database to a tar file.
Full Description

docker-mongodump

About

Quick wrapper script for mongodump in the dockerfile/mongodb image that will
dump the mongo databases you mount.

Usage

Assuming you have a mongodb container running.

CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                  NAMES
4e810d219a9c        dockerfile/python:latest    "python -m SimpleHTT   15 hours ago        Up 4 seconds                               app
56e6f5157d12        dockerfile/mongodb:latest   "mongod"               15 hours ago        Up 2 minutes        27017/tcp, 28017/tcp   app/db,mongodb

You can then run this image as a temporary container to dump the database.

$ docker run --rm -v $(pwd):/dump --link mongodb:dump docker.moduscreate.com/mongodump

This will drop the backup in your current directory. From there you can do what you need with it.

Docker Pull Command
Owner
moduscreate

Comments (0)