Skip to content

Docker image for periodically backing up MongoDB databases

License

Notifications You must be signed in to change notification settings

fuzzy-ai/backup-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backup-mongodb

This is a Docker image for periodically backing up MongoDB databases.

License

Written in 2016 by Evan Prodromou [email protected]

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.

Installation

The image is available on Docker Hub as fuzzyio/backup-mongodb.

  docker pull fuzzyio/backup-mongodb

Configuration

The container makes a daily date-stamped backup of the MongoDB database you specify to its /backup directory. You'll typically want to attach a volume to the container so that it backs up to a location under your control.

The image uses the following environment variables:

  • HOST: The host to connect to for getting the database. Can be a plain hostname like server1 or a replication set definition like myrepl/server1,server2,server3.
  • DATABASE The database to back up. This image will only back up one database; run multiple containers if you need multiple databases backed up.

An example Docker Compose file:

version: '2'
services:
  foobar:
    image: mongo:3.2
  backup:
    image: fuzzyio/backup-mongodb
    links:
    - foobar:foobar
    volumes:
     - ./backup:/backup
    environment:
      HOST: foobar
      DATABASE: bazquux

About

Docker image for periodically backing up MongoDB databases

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages