approach to migrate mongodb using mongomirror
: Setting up mongodb instace on GCE and then migrate to another on GCE only
- setting up 2 GCE on same project
- Installed mongodb on both GCE
- Installed mongomirror on source vm1
- Tried exeuting mongomirror command on source GCE using username and pwd
./mongomirror --host rsMigration/SOURCE_IP --username root --password root123 --destination DESTINATION_IP:27017 --destinationUsername admin --destinationPassword admin123
Output:
mongomirror version: 0.12.2
git version: 9b30f320e44f90afec5c0fa792d4c003b71ead6b
Go version: go1.16.7
os: linux
arch: amd64
compiler: gc
2021-10-27T07:57:03.252+0000 Error initializing mongomirror: could not initialize source connection: could not connect to server: server selection error: server selection timeout, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: 27017:27017, Type: Unknown, Last error: connection() error occured during connection handshake: dial tcp 0.0.105.137:27017: i/o timeout }, ] }