I have to move a 200GB MongoDB from one server to another (both Windows 2016 OS). During this operation, it is assumed that the accompanying program will be offline, so no need to worry about inconsistent data, but I need to minimize the downtime. Diskspace is not an issue, but downtime is. I've tried testing it with mongodump and mongorestore, but that took almost 20 hours to complete, which seems pretty ridiculous. I'm looking at a couple other options:
- Use copydb
- Take a snapshot of the disk and/or copy the db folder directly to the new server and point the installation to that by changing the path in the .conf file.
I'm guessing #2 would be fastest if it will work, but I haven't found any real confirmation that it works on a Windows platform. Has anyone successfully done this? If so, is it as simple as I described? As mentioned, MongoDB and its accompanying program can be turned off completely for this operation.
Alternatively, can anyone give me a ballpark figure on how long copydb takes versus a mongodump/mongorestore operation?