Once the database has been restored correctly you can run the NodeBB installer.
When it asks for the database you will just tell it the database name of the database you just restored.
This should then install NodeBB with your old database.
Yes, this has worked for me as well.
Making a backup of the nodebb database on the old server, for example:
mongodump -u nodebb -p [password] -d nodebb -o dump/nodebb-2018-03-30
Restoring the nodebb database from that backup, after copying it to the new server:
mongorestore -u nodebb -p [password] -d nodebb dump/nodebb-2018-03-30/nodebb/
And then installing NodeBB on the new server.