Calling mongodump wrapped into docker

My setup is as follows:

  • there is a mongodb replica set (v. 2.4.8), which I like to backup via mongodump
  • there is a machine (NAS) outside the replica set, which should perform the the backup task, but does not have the mongodump binary installed. But it has docker support.

So there is my idea to use docker to perform the mongodump on the NAS. A shell script “” should wrap the docker call to mongodump with all needed params and I would call it like:

  • Dokku/Docker, how to access file in file system of running container?
  • docker, csgo server, lgsm, server never start
  • Docker layer info post v1.10
  • Bcrypt installation fails in Docker
  • How do I not create docker container logs?
  • Supervisor is not starting up
  • --host rs/url -u backup -p "password" --out ./dump/

    Is this possible with docker? What would the shell script look like?

  • No module named django error when running any command in docker with docker-compose
  • install nvm in docker
  • Docker for Windows Swarm IIS Service with Win10 Insider running but unreachable
  • Understanding Docker best practices
  • How to build a docker container for a java app
  • Why Is Apache The Primary Webserver In Docker Containers (for PHP)
  • One Solution collect form web for “Calling mongodump wrapped into docker”

    If found the solution. The command I use to perform the mongodump via docker ist:

    docker run --rm --name some-mongo -v /volume1/Backups/mongodump:/dumps --entrypoint mongodump mongo --host rs1/ -u backup -p "password" --out /dumps
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.