0

I need to do mongorestore from my mongodb 4.2 to DocumenDb 4.0 compatible i got the command from aws which is this

mongorestore --ssl --host="abc.aws.com:27017" --username=user --password=pass --sslCAFile rds-combined-ca-bundle.pem dump

but it is showing me this error

[1] 1120
-bash: dGFp: command not found
[root@mongo-tf-doc01 dump]# 2021-04-06T12:10:48.434+0000        error connecting to host: could not connect to server: server selection error: server selection timeout
current topology: Type: Single
Servers:
Addr: abc.aws.com:27017:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection(abc.aws.com:27017[-121]) connection is closed

I am able to connect documentdb successfully so i know this is not a connection problem but error occurs when i restore

0

This happened because AWS DocumentDB is only mongo 4.0 compatible and I was trying to restore from mongo 4.2, to solve this I just used AWS DMS as it was free, process is simple and there are many tutorials available from AWS and as well as other people on youtube

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.