For now at least, they are basically equivalent, assuming the mongod
is not doing anything else significant. To explain, in versions 2.6 and below, the mongorestore
utility effectively contains the mongod
binary which allows it to act as a mongod
and insert to data files without a mongod
running already. The advantage a solo mongorestore
usually has is that it won't be doing anything else whereas usually a running mongod
will be replicating or servicing other operations besides the mongorestore
.
From version 2.8 onward, this will no longer be the case (unless something changes, 2.8 is not yet released as of writing this), and you will be required to have a mongod
running in order to perform a mongorestore
(or a mongodump
for that matter). Therefore, with an eye on the future, running a mongod
and using that to perform the restore would be the advisable method to use.