Step1- I have following collections in my main db [running on port 27017]
$mongo
$show dbs
show dbs DB 0.078GB
admin (empty)
auditing
local
university
test
Step2- Now I am creating replica using below command
$mongod --dbpath ~/mongodb_data_dir/mongo/data0 --replSet auditlogreplySet --port 27018
$mongod --dbpath ~/mongodb_data_dir/mongo/data1 --replSet auditlogreplySet --port 27019
$mongod --dbpath ~/mongodb_data_dir/mongo/data2 --replSet auditlogreplySet --port 27020
Step3- running mongo for port 27018
$ mongo --port 27018
$show dbs
admin (empty)
local 0.328GB
Query: is it possible to sync all dbs from port 27017(main DB) to replica 27018? Please help. so that I can see all the dbs existing in main db in replica set.