Mongorestore not fully work

Hi guys

I have moved some data from an old Ubuntu server to a new one, I used Rsync to copy a lot of stuff that working correctly like Mysql data and Apache config file.

However, Mongo not, the old server use Mongo V2.6 and the new one use Mongo V4.4, when use mongorestore, there has no error but said no indexed restore.

I have reindex it by command reindex , and I can see the index by command getIndex , but, if I use show dbs , these still are 0.000GB, the old server is 0.078GB, and the new server missed a table (index maybe?)

So the website can not log in, I guess the reason is MongoDB.

I know system.indexes have moved at mongov4.2, but I don’t know how to do it now.

Any help
Thanks

Welcome to the MongoDB Community Forums @Kevin_Wang !

Unless you excluded creating indexes using --noIndexRestore, mongorestore recreates all indexes by default.

A few things to check:

  • Were they any errors when you ran mongorestore or did it report the expected number of documents inserted?

  • What version of mongorestore are you using (as reported by mongorestore --version?

  • What version of mongo shell are you using (as reported by mongo --version)?

Regards,
Stennie