There are different ways to take Backup from MongoDB. Using mongodump is one of simple and efficient way to implement it. The bash script presented here take backup from replica set after verifying that current server is slave and then transfer it to separate backup server along with capturing vital information of all steps in log file.
Full story »