In our production MongoDB database, we have a database whose size is around 700GB. We need to migrate data into new MongoDB server which is in a different domain than the current server. Please, anyone, suggest which is the best way to do it?
You can use mongodump using --gzip parameter, as this will provide 10 fold compression. You will get the backup size around 70 GB.
How much time it will take for the whole process depends on quite a lot of parameters. However, let me provide a rough estimation
A better way if both the servers are in the same network is to configure replica set and add the new server as a replica set member with priority & votes as 0. You can check this link for more details. Once the data is replicated, you can reconfigure the new server to priority 1 & votes 1 and then down the current server.