Skip to content

Ovski4/ansible-playbook-mongo-dump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

MongoDB dump

An Ansible playbook to back up a MongoDB database and optionally prune backups older than 7 days (if prune is set to yes). Compatible with systems using the apt package manager (e.g., Debian, Ubuntu, Linux Mint).

Usage example

With ansible

ansible-playbook /var/www/ansible/playbooks/mongo-dump/main.yml \
    -e "mongo_dumps_target_folder=/var/folder/mongo_dumps" \
    -e "prune=yes" \
    -e "db_host=mongo.domain.org" \
    -e "db_port=27017" \
    -e "db_name=mongo_db_name" \

Using the ansible docker image with the docker-compose configuration

Update the docker-compose.yml file according to your needs, then run:

docker-compose run mongo-dump

About

An ansible playbook used to create a dump from a mongo database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors