Simple and efficient MongoDB Backup using script

There are different ways to take Backup from MongoDB. Using mongodump utility is one of simple and efficient way. The script identifies slave server from a mongodb replica set and take dump using mongodump and then transfer dump to separate backup server along with logging vital information of all steps.