I have read the mongodb docs that talk about mongodump, mongorestore, replicas, etc. Our database is a 3 node cluster. I tested few things on how to how to bring in a fresh node if a node fails, and all that works for me.
My problem is how to do I backup the MongodDB data files without shutting the mongodb cluster that can be used later to re-generate the whole cluster. The question arises in my mind because if a node fails, adding a new node is easy(start with blank location of /data/db and things fall in place). If I had a single node and no replica set, I can simply do mondodump and mongorestore and that should work is what i understand. However the mongodb docs say that mongodump cannot be used to restore replica sets.
So say if I have a script or something that takes mongodb dumps from a primary, how do I use this mondodb dump to generate the whole cluster if I have to? Basically, I am trying to do periodic backups and want those backups to recover the whole cluster in case all 3 nodes die. What is the best practice for it? I could not really understand this from the docs