mongorestore
-u <USER> \
-h <HOST>:<PORT> \
--gzip \
--archive=<ARCHIVE PATH GZ> \
--noIndexRestore \
-p<PASSWORD> \
--authenticationDatabase=<DATABASE> \
--drop \
--nsFrom="<DATABASE NAME PREVIOUS>.*" \
--nsTo="<DATABASE NAME TO>.*"
Where
-
is the name of the previous database.
-
is the name of the target database