I have 2 computers in different places (so it\'s impossible to use the same wifi network). One contains about 50GBs of data (MongoDB files) that I want to move to the second on
When you start mongod
process you provide an argument to it --dbpath /directory
which is how it knows where the data folder is.
All you need to do is:
mongod
process on the old computer. wait till it exits.mongod
process on the new computer giving it --dbpath /newdirectory
argument.The mongod
on the new machine will use the folder you indicate with --dbpath. There is no need to "recognize" as there is nothing machine specific in that folder, it's just data.