wtorrealba / mongodb-cluster-backup

Script for backing up mongodb clusters
18 stars 9 forks source link

mongodb-cluster-backup

This is a python script for backing up mongodb clusters. This tool get connected to a mongos inside the cluster and try to get the sharding configuration from that server, once the sharding configuration is available the script select a secondary for each shard and make the backup in those secondaries.

The backup process is as following:

The script can connect to authenticated mongo environments, if you do not give the username and password the script will connect as unauthenticated.

The connection to the secondaries is made over SSH, for that it is required and username and the path to the ssh private key, the user must be a SUDOER in order to stop the mongo service.

Requirements:

In order to make it easy, the script is based on tested and existing tools like:

Usage: backup.py [options]

Options: