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:

  • php ftp_get() not working in Docker container
  • Network connection inside a container
  • how to assign public IP while run the docker container in linux
  • How to RUN plenv/rbenv in Dockerfile?
  • How do I mount a volume in a docker container in .gitlab-ci.yml?
  • “no such file or directory” when running Docker image
  • --host rs/url -u backup -p "password" --out ./dump/

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

  • libcurl with ares on ubuntu 14.04
  • Express does not run on docker, but on localhost
  • How to link docker images to their composing layers on the disk?
  • How to gracefully shut down a server running in docker
  • JDBC driver class not loading for JAVA app when it connects to Postgres in Docker
  • HTTPS on Elastic Beanstalk (Docker Multi-container)
  • 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.