Hi
Is it okay to do restore like this? Is there any risk/problem to do like this?
The steps outlined in the Restore a Replica Set from MongoDB Backups page assumes you need to restore from a filesystem snapshot or a copy of the dbpath directory. If you are restoring from a mongodump output, some of those steps are not necessary, particularly the steps regarding the creation of a new replica set.
Is it better to run mongorestore directly on primary node of the old replica set?
A replica set can be seen as a single unit for most purposes, so you can just execute mongorestore on the primary of the replica set, and the restored data will be duly replicated to the remaining nodes in the set. In fact, you can specify mongorestore --host parameter to connect to a replica set and it will figure out the primary for you.
Please note that you would need to clear out the target replica set for restore. Otherwise the restored data would have identical _id field to the existing data, and the restore would fail. You can also pass the --drop parameter to mongorestore to drop the existing collection before the restore.
Best regards
Kevin