I am using this command to save output to a file.
mongorestore --host %computerName%:%_portnumber% -u Admin -p user --oplogReplay %_sourceFolder% >> D:\Data\admin\abc.log
This creates an empty file and all the output is listed on the command prompt.
Is there a way to get the output to a file? Any help is greatly appreciated.
On Windows, I use below this
mongodump.exe /d test /o C:\Work 2> C:\temp\testdump.log
Actually, stream2 is STDERR but it works for MongoDB.
More info
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With