I'm working on a migration of MongoDB Replica Set from on premises to AWS. It's 300 GB of data. I've evaluated the following options:
- MongoDB replica sets. It's really slow, initial sync takes 4/5 days.
- Rsync. Rsync while MongoDB is running, then stop it, and run Rsync again. It doesn't work as expected, Rsync for some reason always takes the same amount of time.
- Rsync + Replica Set. Stop a secondary member, rsync, start mongo, and then wait MongoDB replication to sync the latest updates.
I have questions for the first two options.
- I do not understand why initial sync is so slow.
- I do not understand why rsync is copying all the data always. I'm using rsync -a.
Option 3 should work, testing it. But if you have better options, it would be great.